crepererum commented on code in PR #5386:
URL: https://github.com/apache/arrow-datafusion/pull/5386#discussion_r1117927548
##########
datafusion/core/src/physical_plan/file_format/parquet/page_filter.rs:
##########
@@ -110,14 +110,16 @@ impl PagePruningPredicate {
pub fn try_new(expr: &Expr, schema: SchemaRef) -> Result<Self> {
let predicates = split_conjunction(expr)
.into_iter()
- .filter_map(|predicate| match predicate.to_columns() {
- Ok(columns) if columns.len() == 1 => {
- match PruningPredicate::try_new(predicate.clone(),
schema.clone()) {
- Ok(p) if !p.allways_true() => Some(Ok(p)),
- _ => None,
+ .filter_map(|predicate| {
+ match PruningPredicate::try_new(predicate.clone(),
schema.clone()) {
+ Ok(p)
+ if (!p.allways_true())
+ && (p.required_columns().n_columns() < 2) =>
Review Comment:
Yeah, we skip the predicate if we don't refer to any column. However you
might be right (at least this is how I read your comment) that we need
additional test coverage for a "constant" predicate (i.e. one that doesn't
reference any column). I'll check next week if such a test exists and if not,
add one.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]