alamb commented on code in PR #14295: URL: https://github.com/apache/datafusion/pull/14295#discussion_r1942785397
########## datafusion/physical-optimizer/src/pruning.rs: ########## @@ -834,15 +834,15 @@ impl RequiredColumns { None => (self.columns.len(), true), }; - let suffix = match stat_type { - StatisticsType::Min => "min", - StatisticsType::Max => "max", - StatisticsType::NullCount => "null_count", - StatisticsType::RowCount => "row_count", + let column_name = column.name(); Review Comment: The only question I have is that `PruningStatistics` is now still in terms of `Column`: https://github.com/apache/datafusion/blob/20544bcccd83e0de36e2944ad2b99615ad3bb41d/datafusion/physical-optimizer/src/pruning.rs#L120-L121 So that seems like it means that when building the schema for required columns there will be multiple entries for `row_count` (I provide a test elsewhere) ```rust pub struct RequiredColumns { /// The statistics required to evaluate this predicate: /// * The unqualified column in the input schema /// * Statistics type (e.g. Min or Max or Null_Count) /// * The field the statistics value should be placed in for /// pruning predicate evaluation (e.g. `min_value` or `max_value`) columns: Vec<(phys_expr::Column, StatisticsType, Field)>, } ``` -- 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