Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Jul 9, 2024
1 parent dc814c8 commit 49d206e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions datafusion/optimizer/src/common_subexpr_eliminate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,14 +342,9 @@ impl CommonSubexprEliminate {
let input = unwrap_arc(input);
let expr = vec![predicate];
self.try_unary_plan(expr, input, config)?
.transform_data(|(mut new_expr, new_input)| {
.map_data(|(mut new_expr, new_input)| {
assert_eq!(new_expr.len(), 1); // passed in vec![predicate]
let new_predicate = new_expr.pop().unwrap();
// the closure didn't transform the expr, but will be
// combined with the result of try_unary_plan
Ok(Transformed::no((new_predicate, new_input)))
})?
.map_data(|(new_predicate, new_input)| {
Filter::try_new(new_predicate, Arc::new(new_input))
.map(LogicalPlan::Filter)
})
Expand Down

0 comments on commit 49d206e

Please sign in to comment.