Skip to content

Commit

Permalink
Further simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Oct 6, 2022
1 parent c863316 commit 139f08d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions datafusion/optimizer/src/unwrap_cast_in_comparison.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,9 @@ impl ExprRewriter for UnwrapCastExprRewriter {
Expr::BinaryExpr { left, op, right } => {
let left = left.as_ref().clone();
let right = right.as_ref().clone();
let left_type = left.get_type(&self.schema);
let right_type = right.get_type(&self.schema);
let left_type = left.get_type(&self.schema)?;
let right_type = right.get_type(&self.schema)?;
// Because the plan has been done the type coercion, the left and right must be equal
let left_type = left_type?;
let right_type = right_type?;
if is_support_data_type(&left_type)
&& is_support_data_type(&right_type)
&& is_comparison_op(op)
Expand Down

0 comments on commit 139f08d

Please sign in to comment.