Commits


Andrew Lamb authored and Jorge C. Leitao committed 29119e91c0e
ARROW-11620: [Rust][DataFusion] Consistently use Arc<dyn TableProvider> rather than Box and Arc NOTE: This is a backwards incompatible change in DataFusion Inspired by a conversation with @seddonm1 https://github.com/apache/arrow/pull/9448#discussion_r573289996 and https://github.com/apache/arrow/pull/9445 as well as some upcoming needs in IOx (a consumer of DataFusion) # Rationale: * No `TableProvider` APIs actually require ownership of the `TableProvider` (they all take `&self`) * Internally DataFusion was storing the TableProvider as an Arc already and inconsistently uses `Box`d and `Arc`d table providers (e.g. in [`LogicalPlan::TableScan`](https://github.com/apache/arrow/blob/437c9173c3e067712eb714c643ca839acc7ed7f6/rust/datafusion/src/logical_plan/plan.rs#L125)) * This change allows the same `TableProvider` instance to be reused easily for different `ExecutionContext`s # Changes * Change all uses of `TableProvider` to be wrapped in `Arc` rather than `Box` Closes #9487 from alamb/alamb/arcd_table_provider Authored-by: Andrew Lamb <andrew@nerdnetworks.org> Signed-off-by: Jorge C. Leitao <jorgecarleitao@gmail.com>