alexanderbianchi commented on code in PR #113:
URL:
https://github.com/apache/datafusion-iceberg/pull/113#discussion_r4608007706
##########
crates/datafusion/src/table_provider/static_table_provider.rs:
##########
@@ -120,18 +120,31 @@ impl TableProvider for IcebergStaticTableProvider {
async fn scan(
&self,
- _state: &dyn Session,
+ state: &dyn Session,
projection: Option<&Vec<usize>>,
filters: &[Expr],
limit: Option<usize>,
) -> Result<Arc<dyn ExecutionPlan>> {
- // Use cached table (no refresh)
- let source = IcebergDataSource::builder(self.table.clone(),
self.schema.clone())
- .with_snapshot_id(self.snapshot_id)
- .with_projection(projection)
- .with_filters(filters)
- .with_fetch(limit)
- .build()?;
+ // Use cached table (no refresh).
+ let (schema, tasks) = FileScanTaskProviderBuilder::new(
+ state.task_ctx(),
Review Comment:
Passing state lets us avoid passing individual options into the builder
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]