findepi commented on code in PR #11516: URL: https://github.com/apache/datafusion/pull/11516#discussion_r1686650408
########## datafusion/core/src/datasource/listing_table_factory.rs: ########## @@ -49,16 +49,18 @@ impl ListingTableFactory { impl TableProviderFactory for ListingTableFactory { async fn create( &self, - state: &SessionState, + state: &dyn CatalogSession, cmd: &CreateExternalTable, ) -> Result<Arc<dyn TableProvider>> { - let file_format = state + // TODO remove downcast_ref from here. Should file format factory be an extension to session state? Review Comment: Good point. OTOH, `dyn TableProviderFactory` is already provided to the `ListingSchemaProvider`, so maybe the table provider could just have it, without getting it from the session? Also, how do pluggable file format work with table formats such as Iceberg and Delta? Delta is always Parquet, but it's different Parquet metadata than Iceberg, so they are not handled the same way, are they? -- 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