924060929 commented on code in PR #12147:
URL: https://github.com/apache/doris/pull/12147#discussion_r957310076
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/memo/GroupExpression.java:
##########
@@ -181,13 +208,14 @@ public boolean equals(Object o) {
return false;
}
GroupExpression that = (GroupExpression) o;
- // if the plan is LogicalRelation or PhysicalRelation, this == that
should be true,
+ // if the plan is UnboundRelation or LogicalRelation or
PhysicalRelation, this == that should be true,
// when if one relation appear in plan more than once,
// we cannot distinguish them throw equals function, since equals
function cannot use output info.
- if (plan instanceof LogicalRelation || plan instanceof
PhysicalRelation) {
+ if (plan instanceof UnboundRelation || plan instanceof LogicalRelation
|| plan instanceof PhysicalRelation) {
return false;
}
- return children.equals(that.children) && plan.equals(that.plan);
+ return children.equals(that.children) && plan.equals(that.plan)
+ &&
plan.getLogicalProperties().equals(that.plan.getLogicalProperties());
Review Comment:
the XxxRelation will return false before compare the logical properties, you
can see the code a few lines up
--
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]