Skip to content

Commit e3f1d33

Browse files
PR comments
1 parent 627f051 commit e3f1d33

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

datafusion/core/src/physical_plan/file_format/parquet.rs

-5
Original file line numberDiff line numberDiff line change
@@ -1278,11 +1278,6 @@ mod tests {
12781278
.await
12791279
.unwrap();
12801280

1281-
// This does not look correct since the "c2" values in the result do not in fact match the predicate `c2 == 0`
1282-
// but parquet pruning is not exact. If the min/max values are not defined (which they are not in this case since the it is
1283-
// a null array, then the pruning predicate (currently) can not be applied.
1284-
// In a real query where this predicate was pushed down from a filter stage instead of created directly in the `ParquetExec`,
1285-
// the filter stage would be preserved as a separate execution plan stage so the actual query results would be as expected.
12861281
let expected = vec![
12871282
"+----+----+",
12881283
"| c1 | c2 |",

datafusion/expr/src/expr_fn.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -456,10 +456,8 @@ pub fn combine_filters_disjunctive(filters: &[Expr]) -> Option<Expr> {
456456
if filters.is_empty() {
457457
return None;
458458
}
459-
let combined_filter = filters
460-
.iter()
461-
.reduce(|acc, filter| or(acc, filter.clone()));
462-
Some(combined_filter)
459+
460+
filters.iter().cloned().reduce(or)
463461
}
464462

465463
/// Recursively un-alias an expressions

0 commit comments

Comments
 (0)