Skip to content

Commit 883f562

Browse files
committed
process edge coner
1 parent f732646 commit 883f562

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

Cargo.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

datafusion/optimizer/src/push_down_filter.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,9 @@ impl OptimizerRule for PushDownFilter {
785785
let new_predicates = simplify_predicates(predicate)?;
786786
if old_predicate_len != new_predicates.len() {
787787
let Some(new_predicate) = conjunction(new_predicates) else {
788-
return plan_err!("at least one expression exists");
788+
// new_predicates is empty - remove the filter entirely
789+
// Return the child plan without the filter
790+
return Ok(Transformed::yes(Arc::unwrap_or_clone(filter.input)));
789791
};
790792
filter.predicate = new_predicate;
791793
}
@@ -2241,7 +2243,7 @@ mod tests {
22412243
plan,
22422244
@r"
22432245
Projection: test.a, test1.d
2244-
Cross Join:
2246+
Cross Join:
22452247
Projection: test.a, test.b, test.c
22462248
TableScan: test, full_filters=[test.a = Int32(1)]
22472249
Projection: test1.d, test1.e, test1.f
@@ -2271,7 +2273,7 @@ mod tests {
22712273
plan,
22722274
@r"
22732275
Projection: test.a, test1.a
2274-
Cross Join:
2276+
Cross Join:
22752277
Projection: test.a, test.b, test.c
22762278
TableScan: test, full_filters=[test.a = Int32(1)]
22772279
Projection: test1.a, test1.b, test1.c

0 commit comments

Comments
 (0)