alamb commented on code in PR #3703:
URL: https://github.com/apache/arrow-datafusion/pull/3703#discussion_r989019083
##########
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());
- }
// 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?;
Review Comment:
> think the change could be slightly larger, replacing lines 123 through
131 just with:
Done in 139f08d66
--
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]