Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
adriangb committed Dec 17, 2024
1 parent 952d354 commit 566af31
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions datafusion/physical-optimizer/src/pruning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1496,7 +1496,11 @@ fn build_predicate_expression(
(false, true) => Operator::ILikeMatch,
(true, true) => Operator::NotILikeMatch,
};
(like_expr.expr().clone(), op, like_expr.pattern().clone())
(
Arc::clone(like_expr.expr()),
op,
Arc::clone(like_expr.pattern()),
)
} else {
return unhandled_hook.handle(expr);
}
Expand Down Expand Up @@ -1680,15 +1684,15 @@ fn build_like_match(
} else {
// the like expression is a literal and can be converted into a comparison
let bound = Arc::new(phys_expr::Literal::new(ScalarValue::Utf8(Some(s.clone()))));
(bound.clone(), bound)
(Arc::clone(&bound), bound)
};
let lower_bound_expr = Arc::new(phys_expr::BinaryExpr::new(
lower_bound,
Operator::LtEq,
max_column_expr.clone(),
Arc::clone(&max_column_expr),
));
let upper_bound_expr = Arc::new(phys_expr::BinaryExpr::new(
min_column_expr.clone(),
Arc::clone(&min_column_expr),
Operator::LtEq,
upper_bound,
));
Expand Down

0 comments on commit 566af31

Please sign in to comment.