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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalOlapScan.java:
##########
@@ -107,28 +110,29 @@ public boolean equals(Object o) {
         if (o == null || getClass() != o.getClass() || !super.equals(o)) {
             return false;
         }
-        return true;
+        return Objects.equals(selectedPartitionIds, ((LogicalOlapScan) 
o).selectedPartitionIds)

Review Comment:
   need override hashCode function



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/PhysicalOlapScan.java:
##########
@@ -103,14 +105,7 @@ public boolean equals(Object o) {
         if (this == o) {
             return true;
         }
-        if (o == null || getClass() != o.getClass() || !super.equals(o)) {
-            return false;
-        }
-        PhysicalOlapScan that = (PhysicalOlapScan) o;
-        return selectedIndexId == that.selectedIndexId
-                && Objects.equals(selectedTabletIds, that.selectedTabletIds)
-                && Objects.equals(selectedPartitionIds, 
that.selectedPartitionIds)
-                && Objects.equals(olapTable, that.olapTable);
+        return o != null && getClass() == o.getClass() && super.equals(o);

Review Comment:
   why change this, i think we decide equals and hashCode should contains all 
attributes



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