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

jakevin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 608fede57a7 [fix](Nereids) should not generate same exprId for diff 
column when sink (#30501)
608fede57a7 is described below

commit 608fede57a78f77933a7b4ebd80b523cbccc0848
Author: morrySnow <101034200+morrys...@users.noreply.github.com>
AuthorDate: Mon Jan 29 18:51:49 2024 +0800

    [fix](Nereids) should not generate same exprId for diff column when sink 
(#30501)
---
 .../java/org/apache/doris/nereids/rules/analysis/BindSink.java   | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindSink.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindSink.java
index 7dbb6b3e1e1..c0e8162f08f 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindSink.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindSink.java
@@ -213,7 +213,14 @@ public class BindSink implements AnalysisRuleFactory {
                                             + " target table " + 
table.getName());
                                 }
                                 if (columnToOutput.get(seqCol.get().getName()) 
!= null) {
-                                    columnToOutput.put(column.getName(), 
columnToOutput.get(seqCol.get().getName()));
+                                    // should generate diff exprId for seq 
column
+                                    NamedExpression seqColumn = 
columnToOutput.get(seqCol.get().getName());
+                                    if (seqColumn instanceof Alias) {
+                                        seqColumn = new Alias(((Alias) 
seqColumn).child(), column.getName());
+                                    } else {
+                                        seqColumn = new Alias(seqColumn, 
column.getName());
+                                    }
+                                    columnToOutput.put(column.getName(), 
seqColumn);
                                 }
                             } else if (isPartialUpdate) {
                                 // If the current load is a partial update, 
the values of unmentioned


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

Reply via email to