This is an automated email from the ASF dual-hosted git repository.

morrysnow pushed a commit to branch vector-index-dev
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/vector-index-dev by this push:
     new c3e0a106dd1 [fix](vector) equals and hashcode are wrong in olap 
relation (#50558)
c3e0a106dd1 is described below

commit c3e0a106dd1b2b9839df44eb689c732a35d5df44
Author: morrySnow <zhangwen...@selectdb.com>
AuthorDate: Wed Apr 30 09:52:54 2025 +0800

    [fix](vector) equals and hashcode are wrong in olap relation (#50558)
---
 .../nereids/trees/plans/logical/LogicalOlapScan.java    | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalOlapScan.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalOlapScan.java
index d28250b394e..9e58e15ff97 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalOlapScan.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalOlapScan.java
@@ -720,6 +720,9 @@ public class LogicalOlapScan extends LogicalCatalogRelation 
implements OlapScan
 
     @Override
     public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
         if (o == null || getClass() != o.getClass()) {
             return false;
         }
@@ -727,11 +730,21 @@ public class LogicalOlapScan extends 
LogicalCatalogRelation implements OlapScan
             return false;
         }
         LogicalOlapScan that = (LogicalOlapScan) o;
-        return Objects.equals(virtualColumns, that.virtualColumns);
+        return selectedIndexId == that.selectedIndexId && indexSelected == 
that.indexSelected
+                && partitionPruned == that.partitionPruned && 
Objects.equals(preAggStatus, that.preAggStatus)
+                && Objects.equals(selectedTabletIds, that.selectedTabletIds)
+                && Objects.equals(manuallySpecifiedPartitions, 
that.manuallySpecifiedPartitions)
+                && Objects.equals(manuallySpecifiedTabletIds, 
that.manuallySpecifiedTabletIds)
+                && Objects.equals(selectedPartitionIds, 
that.selectedPartitionIds)
+                && Objects.equals(hints, that.hints)
+                && Objects.equals(tableSample, that.tableSample)
+                && Objects.equals(virtualColumns, that.virtualColumns);
     }
 
     @Override
     public int hashCode() {
-        return super.hashCode();
+        return Objects.hash(super.hashCode(), selectedIndexId, indexSelected, 
preAggStatus, cacheSlotWithSlotName,
+                selectedTabletIds, partitionPruned, 
manuallySpecifiedTabletIds, manuallySpecifiedPartitions,
+                selectedPartitionIds, hints, tableSample, virtualColumns);
     }
 }


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

Reply via email to