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


##########
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 && limit == that.limit && 
Objects.equals(orderKeys, that.orderKeys);

Review Comment:
   we need to discuss later, should we split PhysicalHeapSort to 
PhysicalHeapSort and PhysicalTopN



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalSort.java:
##########
@@ -84,6 +84,24 @@ public String toString() {
         return "Sort (" + StringUtils.join(orderKeys, ", ") + ")";
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        LogicalSort that = (LogicalSort) o;
+        return offset == that.offset && Objects.equals(orderKeys, 
that.orderKeys);

Review Comment:
   logical sort has no limit, should we remove offset?



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