Skip to content

Commit

Permalink
[fix](nereids)use equals instead of == to compare String (apache#45628)
Browse files Browse the repository at this point in the history
when comparing column name, we should use equals method instead of '=='
to compare the content
  • Loading branch information
starocean999 authored Dec 20, 2024
1 parent 8b36f79 commit db3aff9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit db3aff9

Please sign in to comment.