Skip to content

Commit

Permalink
add doc
Browse files Browse the repository at this point in the history
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
  • Loading branch information
jayzhan211 committed Jun 20, 2024
1 parent e1f9ccc commit 1ddc00e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion datafusion/optimizer/src/push_down_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,8 @@ impl OptimizerRule for PushDownFilter {
}
}

// Unnest predicates should not be pushed down.
// If no non-unnest predicates exist, early return
if non_unnest_predicates.is_empty() {
filter.input = Arc::new(LogicalPlan::Unnest(unnest));
return Ok(Transformed::no(LogicalPlan::Filter(filter)));
Expand Down Expand Up @@ -762,7 +764,8 @@ impl OptimizerRule for PushDownFilter {
let predicate = conjunction(vec![
unnest_predicate,
keep_predicate,
]).unwrap(); // Safe to unwrap since filters is non-empty
])
.unwrap(); // Safe to unwrap since filters is non-empty
Ok(Transformed::yes(LogicalPlan::Filter(
Filter::try_new(
predicate,
Expand Down

0 comments on commit 1ddc00e

Please sign in to comment.