Skip to content

Commit 079f621

Browse files
adriangbalambappletreeisyellow
authored
replace CASE expressions in predicate pruning with boolean algebra (#13795)
* replace CASE expressions in predicate pruning with boolean algebra * fix merge * update tests * add some more tests * add some more tests * remove duplicate test case * Update datafusion/physical-optimizer/src/pruning.rs * swap NOT for != * replace comments, update docstrings * fix example * update tests * update tests * Apply suggestions from code review Co-authored-by: Andrew Lamb <[email protected]> * Update pruning.rs Co-authored-by: Chunchun Ye <[email protected]> * Update pruning.rs Co-authored-by: Chunchun Ye <[email protected]> --------- Co-authored-by: Andrew Lamb <[email protected]> Co-authored-by: Chunchun Ye <[email protected]>
1 parent b0d7cd0 commit 079f621

File tree

5 files changed

+184
-161
lines changed

5 files changed

+184
-161
lines changed

datafusion/core/src/datasource/physical_plan/parquet/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2001,7 +2001,7 @@ mod tests {
20012001

20022002
assert_contains!(
20032003
&display,
2004-
"pruning_predicate=CASE WHEN c1_null_count@2 = c1_row_count@3 THEN false ELSE c1_min@0 != bar OR bar != c1_max@1 END"
2004+
"pruning_predicate=c1_null_count@2 != c1_row_count@3 AND (c1_min@0 != bar OR bar != c1_max@1)"
20052005
);
20062006

20072007
assert_contains!(&display, r#"predicate=c1@0 != bar"#);

0 commit comments

Comments
 (0)