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/14 16:11:24 UTC

[GitHub] [doris] morrySnow commented on a diff in pull request #10870: [feature](Nereids): hashCode(), equals() and UT.

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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalAggregate.java:
##########
@@ -163,7 +163,7 @@ public boolean equals(Object o) {
 
     @Override
     public int hashCode() {
-        return Objects.hash(groupByExpressionList, outputExpressionList, partitionExprList, aggPhase);
+        return Objects.hash(super.hashCode(), groupByExpressionList, outputExpressionList, partitionExprList, aggPhase);

Review Comment:
   why need super ?



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalHeapSort.java:
##########
@@ -71,6 +72,23 @@ public boolean hasLimit() {
         return limit > -1;
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        PhysicalHeapSort that = (PhysicalHeapSort) o;
+        return offset == that.offset && Objects.equals(orderKeys, that.orderKeys);

Review Comment:
   limit?



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