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


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/MapLiteral.java:
##########
@@ -218,4 +219,28 @@ public void write(DataOutput out) throws IOException {
             Expr.writeTo(e, out);
         }
     }
+
+    @Override
+    public int hashCode() {
+        return Objects.hashCode(children);
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (o == null) {
+            return false;
+        }
+        if (!(o instanceof MapLiteral)) {
+            return false;
+        }
+        if (this == o) {
+            return true;
+        }
+
+        MapLiteral that = (MapLiteral) o;
+        if (that.children.size() != children.size()) {
+            return false;
+        }

Review Comment:
   ditto



##########
fe/fe-core/src/main/java/org/apache/doris/analysis/ArrayLiteral.java:
##########
@@ -134,6 +135,29 @@ protected void toThrift(TExprNode msg) {
         msg.setChildType(((ArrayType) 
type).getItemType().getPrimitiveType().toThrift());
     }
 
+    @Override
+    public int hashCode() {
+        return Objects.hashCode(children);
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (o == null) {
+            return false;
+        }
+        if (!(o instanceof ArrayLiteral)) {
+            return false;
+        }
+        if (this == o) {
+            return true;
+        }
+        ArrayLiteral that = (ArrayLiteral) o;
+        if (that.children.size() != children.size()) {
+            return false;
+        }

Review Comment:
   remove these lines or u need to check children == null first



-- 
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-unsubscr...@doris.apache.org

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


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

Reply via email to