morrySnow commented on code in PR #25874: URL: https://github.com/apache/doris/pull/25874#discussion_r1377030906
########## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/copier/ExpressionDeepCopier.java: ########## @@ -63,13 +65,27 @@ public Expression visitAlias(Alias alias, DeepCopierContext context) { @Override public Expression visitSlotReference(SlotReference slotReference, DeepCopierContext context) { + Map<ExprId, ExprId> exprIdReplaceMap = context.exprIdReplaceMap; + ExprId newExprId; + if (exprIdReplaceMap.containsKey(slotReference.getExprId())) { + newExprId = exprIdReplaceMap.get(slotReference.getExprId()); + } else { + newExprId = StatementScopeIdGenerator.newExprId(); + exprIdReplaceMap.put(slotReference.getExprId(), newExprId); + } + return slotReference.withExprId(newExprId); + } + + @Override + public Expression visitArrayItemReference(ArrayItemReference slotReference, DeepCopierContext context) { Review Comment: ```suggestion public Expression visitArrayItemReference(ArrayItemReference arrayItemReference, DeepCopierContext context) { ``` ########## fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/ExpressionTranslator.java: ########## @@ -276,7 +276,7 @@ public Expr visitSlotReference(SlotReference slotReference, PlanTranslatorContex } @Override - public Expr visitArrayItemSlot(SlotReference slotReference, PlanTranslatorContext context) { + public Expr visitArrayItemSlot(ArrayItemReference.ArrayItemSlot slotReference, PlanTranslatorContext context) { return context.findColumnRef(slotReference.getExprId()); Review Comment: ```suggestion public Expr visitArrayItemSlot(ArrayItemReference.ArrayItemSlot arrayItemSlot, PlanTranslatorContext context) { return context.findColumnRef(arrayItemSlot.getExprId()); ``` -- 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