hust-hhb commented on code in PR #31626:
URL: https://github.com/apache/doris/pull/31626#discussion_r1512221277
##########
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:
@zhannngchen already change the code, take a look plz.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]