diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindRelation.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindRelation.java index 583244f0902896..d494f90c9cb804 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindRelation.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindRelation.java @@ -257,7 +257,7 @@ private LogicalPlan preAggForRandomDistribution(LogicalOlapScan olapScan) { SlotReference slot = SlotReference.fromColumn(olapTable, col, col.getName(), olapScan.qualified()); ExprId exprId = slot.getExprId(); for (Slot childSlot : childOutputSlots) { - if (childSlot instanceof SlotReference && ((SlotReference) childSlot).getName() == col.getName()) { + if (childSlot instanceof SlotReference && ((SlotReference) childSlot).getName().equals(col.getName())) { exprId = childSlot.getExprId(); slot = slot.withExprId(exprId); break;