mertak-synnada commented on code in PR #15352: URL: https://github.com/apache/datafusion/pull/15352#discussion_r2015906250
########## datafusion/datasource/src/file_scan_config.rs: ########## @@ -645,6 +875,7 @@ impl FileScanConfig { // TODO: This function should be moved into DataSourceExec once FileScanConfig moved out of datafusion/core Review Comment: We may also remove this TODO with above suggestion I believe ########## datafusion-examples/examples/advanced_parquet_index.rs: ########## @@ -498,13 +499,15 @@ impl TableProvider for IndexTableProvider { // provide the factory to create parquet reader without re-reading metadata .with_parquet_file_reader_factory(Arc::new(reader_factory)), ); - let file_scan_config = FileScanConfig::new(object_store_url, schema, file_source) - .with_limit(limit) - .with_projection(projection.cloned()) - .with_file(partitioned_file); + let file_scan_config = + FileScanConfigBuilder::new(object_store_url, schema, file_source) + .with_limit(limit) + .with_projection(projection.cloned()) + .with_file(partitioned_file) + .build(); // Finally, put it all together into a DataSourceExec - Ok(file_scan_config.build()) + Ok(Arc::new(DataSourceExec::new(Arc::new(file_scan_config)))) Review Comment: I meant just a cosmetic change to not re-writing the whole `Arc::new(DataSourceExec::new(Arc::new(file_scan)))` Maybe it can be something like `DataSourceExec::from_file_source(file_scan) -> Arc<DataSourceExec>` What would you think? -- 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-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org