alexanderbianchi commented on code in PR #109:
URL: 
https://github.com/apache/datafusion-iceberg/pull/109#discussion_r4602209008


##########
crates/datafusion/src/table_provider/static_table_provider.rs:
##########
@@ -120,19 +121,25 @@ 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())
+        let mut builder = IcebergDataSourceBuilder::new(&self.table, 
self.schema.clone())
             .with_snapshot_id(self.snapshot_id)
             .with_projection(projection)
             .with_filters(filters)
-            .with_fetch(limit)
-            .build()?;
-        Ok(DataSourceExec::from_data_source(source))
+            .with_fetch(limit);
+
+        let iceberg_cfg = 
IcebergDataFusionConfig::from_config_or_default(state.config());
+        if iceberg_cfg.execution.eager_file_planning {
+            builder = builder
+                .try_with_eagerly_planned_file_scan_tasks(state)

Review Comment:
   Should we just be passing `IcebergDataFusionConfig` into the builder instead 
of if/else in each table provider? For example ArrowOptions I imagine will also 
need to be passed in, as would most options that `IcebergDataFusionConfig` 
eventually has.



-- 
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]

Reply via email to