waynexia commented on code in PR #3726:
URL: https://github.com/apache/arrow-datafusion/pull/3726#discussion_r990582668


##########
datafusion/optimizer/src/common_subexpr_eliminate.rs:
##########
@@ -370,7 +391,12 @@ struct ExprIdentifierVisitor<'a> {
     expr_set: &'a mut ExprSet,
     /// series number (usize) and identifier.
     id_array: &'a mut Vec<(usize, Identifier)>,
-    data_type: DataType,
+    /// input schema for the node that we're optimizing, so we can determine 
the correct datatype
+    /// for each subexpression
+    input_schema: DFSchemaRef,
+    /// all schemas in the logical plan, as a fall back if we cannot resolve 
an expression type
+    /// from the input schema alone
+    all_schemas: Vec<DFSchemaRef>,

Review Comment:
   This random merge used to only exist in the `Filter` plan and was fixed once 
in https://github.com/apache/arrow-datafusion/pull/1925 . Ashamedly, I cannot 
recall why `Filter` is unique :disappointed_relieved: I would like to explain 
it as my mistake, sorry for that >_<
   
   I think it is doable to remove the else branch as it already takes no effect 
after #1925



-- 
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]

Reply via email to