alamb commented on code in PR #11516: URL: https://github.com/apache/datafusion/pull/11516#discussion_r1685368085
########## datafusion/core/src/datasource/listing/table.rs: ########## @@ -736,13 +736,16 @@ impl TableProvider for ListingTable { async fn scan( &self, - state: &SessionState, + state: &dyn CatalogSession, projection: Option<&Vec<usize>>, filters: &[Expr], limit: Option<usize>, ) -> Result<Arc<dyn ExecutionPlan>> { - let (mut partitioned_file_lists, statistics) = - self.list_files_for_scan(state, filters, limit).await?; + // TODO remove downcast_ref from here? Review Comment: Yes, definitely we should remove the downcast (likely by adding some more functions to the `CatalogSession` trait) . But I also think we could do that as a follow on PR with minimal impact Also this pattern shows that existing code could always use this pattern to downcast `&dy CatalogSession` to `&SessionState` which gives us an easy path for all migrations -- 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