zhannngchen commented on code in PR #31626:
URL: https://github.com/apache/doris/pull/31626#discussion_r1508672099


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/UpdateStmt.java:
##########
@@ -211,12 +212,21 @@ private void analyzeSetExprs(Analyzer analyzer) throws 
AnalysisException {
                 && !hasVariant) {
             isPartialUpdate = true;
         }
+        Optional<Column> seqColInTable = Optional.empty();
+        OlapTable olapTable = (OlapTable) targetTable;
+        if (olapTable.hasSequenceCol() && olapTable.getSequenceMapCol() != 
null) {
+            seqColInTable = olapTable.getFullSchema().stream()
+                    .filter(col -> 
col.getName().equalsIgnoreCase(olapTable.getSequenceMapCol())).findFirst();
+        }
         for (Column column : targetTable.getColumns()) {
             Expr expr = new SlotRef(targetTableRef.getAliasAsName(), 
column.getName());
             boolean existInExpr = false;
             for (BinaryPredicate setExpr : setExprs) {
                 Expr lhs = setExpr.getChild(0);
-                if (((SlotRef) lhs).getColumn().equals(column)) {
+                Column exprColumn = ((SlotRef) lhs).getColumn();
+                if (exprColumn.equals(column) || (olapTable.hasSequenceCol()

Review Comment:
   Add comment here



-- 
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

Reply via email to