lgbo-ustc commented on code in PR #8284:
URL: https://github.com/apache/incubator-gluten/pull/8284#discussion_r1897766808


##########
cpp-ch/local-engine/Parser/ExpressionParser.cpp:
##########
@@ -843,4 +868,88 @@ ExpressionParser::parseJsonTuple(const 
substrait::Expression_ScalarFunction & fu
     }
     return res_nodes;
 }
+
+bool ExpressionParser::areEqualNodes(NodeRawConstPtr a, NodeRawConstPtr b)
+{
+    if (a == b)
+        return true;
+
+    if (a->type != b->type || !a->result_type->equals(*(b->result_type)) || 
a->children.size() != b->children.size()
+        || !a->isDeterministic() || !b->isDeterministic())
+        return false;
+
+    switch (a->type)
+    {
+        case DB::ActionsDAG::ActionType::INPUT: {
+            if (a->result_name != b->result_name)

Review Comment:
   inputs have uniqu names



##########
cpp-ch/local-engine/Parser/ExpressionParser.cpp:
##########
@@ -843,4 +868,88 @@ ExpressionParser::parseJsonTuple(const 
substrait::Expression_ScalarFunction & fu
     }
     return res_nodes;
 }
+
+bool ExpressionParser::areEqualNodes(NodeRawConstPtr a, NodeRawConstPtr b)
+{
+    if (a == b)
+        return true;
+
+    if (a->type != b->type || !a->result_type->equals(*(b->result_type)) || 
a->children.size() != b->children.size()
+        || !a->isDeterministic() || !b->isDeterministic())
+        return false;
+
+    switch (a->type)
+    {
+        case DB::ActionsDAG::ActionType::INPUT: {
+            if (a->result_name != b->result_name)

Review Comment:
   inputs have unique names



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to