blaginin commented on code in PR #15352: URL: https://github.com/apache/datafusion/pull/15352#discussion_r2012431846
########## 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: you mean as a`DataSourceExec` function? It also looks a bit verbose to me, but the inner Arc is needed for dynamic dispatch, and the outer one makes the return type more explicit. Happy to make it `DataSourceExec::new_arc` if you want, but i don't think we use that a lot in datafusion -- 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