liukun4515 commented on code in PR #3703:
URL: https://github.com/apache/arrow-datafusion/pull/3703#discussion_r988514034
##########
datafusion/optimizer/src/unwrap_cast_in_comparison.rs:
##########
@@ -122,10 +122,6 @@ impl ExprRewriter for UnwrapCastExprRewriter {
let right = right.as_ref().clone();
let left_type = left.get_type(&self.schema);
let right_type = right.get_type(&self.schema);
- // can't get the data type, just return the expr
- if left_type.is_err() || right_type.is_err() {
- return Ok(expr.clone());
- }
Review Comment:
Why we need to remove this code? @alamb
From the interface `get_type` which may return error, if we meet the error
when get the type of the expr, do we need to throw the error for this rule.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]