waruto210 commented on code in PR #12471: URL: https://github.com/apache/datafusion/pull/12471#discussion_r1764332240
########## datafusion/core/src/datasource/listing/table.rs: ########## @@ -817,6 +817,20 @@ impl TableProvider for ListingTable { .map(|col| Ok(self.table_schema.field_with_name(&col.0)?.clone())) .collect::<Result<Vec<_>>>()?; + // If the filters can be resolved using only partition cols, there is no need to + // pushdown it to TableScan, otherwise, `unhandled` pruning predicates will be generated + let table_partition_col_names = table_partition_cols Review Comment: I conducted some tests and discovered that filters that can be resolved using only `table_partition_cols` generate `unhandled` predicates when creating `PruningPredicate`, which causes `statistics()` to be unable to generate exact stats in some cases. -- 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