You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "adriangb (via GitHub)" <gi...@apache.org> on 2026/03/23 18:00:42 UTC
Re: [PR] Teach row group pruning about struct field predicates [datafusion]
adriangb commented on code in PR #21003:
URL: https://github.com/apache/datafusion/pull/21003#discussion_r2976675306
##########
datafusion/common/src/pruning.rs:
##########
@@ -68,14 +112,14 @@ pub trait PruningStatistics {
/// not known for any row, return `None`.
///
/// Note: the returned array must contain [`Self::num_containers`] rows
- fn min_values(&self, column: &Column) -> Option<ArrayRef>;
+ fn min_values(&self, column: &PruningColumn) -> Option<ArrayRef>;
Review Comment:
I wonder if instead of `PruningColumn` we can / should allow arbitrary `Expr`? Essentially the implementation would match on the Expr. It can only handle `Column` and return `None` for anything else but the Parquet RowGroup stats implementation can match on struct field access as well and handle that accordingly.
We could add new methods like `max_expression_values` that have a default impl
```rust
match expr {
Expr::Column(col) => self.max_values(col),
_ => None,
}
```
Or something like that.
--
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-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org