You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/10/06 03:16:18 UTC

[GitHub] [arrow-datafusion] liukun4515 commented on a diff in pull request #3703: Remove dead code in `UnwrapCastExprRewriter`

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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org