You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/05/21 11:15:35 UTC

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #2569: `LogicalPlanBuilder` now uses `TableSource` instead of `TableProvider`

alamb commented on code in PR #2569:
URL: https://github.com/apache/arrow-datafusion/pull/2569#discussion_r878683705


##########
datafusion/core/src/logical_plan/builder.rs:
##########
@@ -191,16 +191,16 @@ impl LogicalPlanBuilder {
     /// Convert a table provider into a builder with a TableScan
     pub fn scan(
         table_name: impl Into<String>,
-        provider: Arc<dyn TableProvider>,
+        table_source: Arc<dyn TableSource>,
         projection: Option<Vec<usize>>,
     ) -> Result<Self> {
-        Self::scan_with_filters(table_name, provider, projection, vec![])
+        Self::scan_with_filters(table_name, table_source, projection, vec![])
     }
 
     /// Convert a table provider into a builder with a TableScan
     pub fn scan_with_filters(
         table_name: impl Into<String>,
-        provider: Arc<dyn TableProvider>,
+        table_source: Arc<dyn TableSource>,

Review Comment:
   I wonder if we could make the APIs a little  (avoid having to call `provider_as_source`) nicer with something like
   
   Untested:
   ```
   table_source: impl Into<Arc<dyn TableSource>>
   ```
   
   Or add some other trait that would allow us to pass both `Arc<dyn TableSource>` as well as `Arc<dyn TableProvider>`
   
   I think we can always refine the API in a follow on PR



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org