You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/07/20 16:23:37 UTC

[GitHub] [doris] morrySnow commented on a diff in pull request #10882: [enhancement](Nereids)expression equals and hashCode function

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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/analyzer/UnboundFunction.java:
##########
@@ -77,4 +77,24 @@ public <R, C> R accept(ExpressionVisitor<R, C> visitor, C context) {
     public Expression withChildren(List<Expression> children) {
         return new UnboundFunction(name, isDistinct, children);
     }
+
+    @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;
+        }
+        UnboundFunction that = (UnboundFunction) o;
+        return isDistinct == that.isDistinct && name.equals(that.name);

Review Comment:
   super.equals do this already



-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org