morrySnow commented on code in PR #55060:
URL: https://github.com/apache/doris/pull/55060#discussion_r2287405919


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/analyzer/UnboundOneRowRelation.java:
##########
@@ -101,6 +102,26 @@ public LogicalProperties computeLogicalProperties() {
         return UnboundLogicalProperties.INSTANCE;
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        if (!super.equals(o)) {
+            return false;
+        }
+        UnboundOneRowRelation other = (UnboundOneRowRelation) o;
+        return projects.equals(other.projects);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(super.hashCode(), projects);
+    }
+

Review Comment:
   use relation id to distinguish one row relation is enough, so override 
equals and hashCode for UnboundOneRowRelation is not necessary



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/analyzer/UnboundTVFRelation.java:
##########
@@ -78,6 +78,26 @@ public <R, C> R accept(PlanVisitor<R, C> visitor, C context) 
{
         return visitor.visitUnboundTVFRelation(this, context);
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        if (!super.equals(o)) {
+            return false;
+        }
+        UnboundTVFRelation other = (UnboundTVFRelation) o;
+        return functionName.equals(other.functionName) && 
properties.equals(other.properties);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(super.hashCode(), functionName, properties);
+    }
+

Review Comment:
   same as UnboundOneRowRelation



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