This commit is contained in:
@ -191,12 +191,8 @@ public class UpdateStmt extends DdlStmt {
|
||||
|
||||
// step3: generate select list and insert column name list in insert stmt
|
||||
boolean isMow = ((OlapTable) targetTable).getEnableUniqueKeyMergeOnWrite();
|
||||
boolean hasVariant = false;
|
||||
int setExprCnt = 0;
|
||||
for (Column column : targetTable.getColumns()) {
|
||||
if (column.getType().isVariantType()) {
|
||||
hasVariant = true;
|
||||
}
|
||||
for (BinaryPredicate setExpr : setExprs) {
|
||||
Expr lhs = setExpr.getChild(0);
|
||||
if (((SlotRef) lhs).getColumn().equals(column)) {
|
||||
@ -204,13 +200,10 @@ public class UpdateStmt extends DdlStmt {
|
||||
}
|
||||
}
|
||||
}
|
||||
// 1.table with sequence col cannot use partial update cause in MOW, we encode pk
|
||||
// table with sequence col cannot use partial update cause in MOW, we encode pk
|
||||
// with seq column but we don't know which column is sequence in update
|
||||
// 2. variant column update schema during load, so implement partial update is complicated,
|
||||
// just ignore it at present
|
||||
if (isMow && ((OlapTable) targetTable).getSequenceCol() == null
|
||||
&& setExprCnt <= targetTable.getColumns().size() * 3 / 10
|
||||
&& !hasVariant) {
|
||||
&& setExprCnt <= targetTable.getColumns().size() * 3 / 10) {
|
||||
isPartialUpdate = true;
|
||||
}
|
||||
Optional<Column> sequenceMapCol = Optional.empty();
|
||||
|
||||
@ -159,7 +159,7 @@ public class UpdateCommand extends Command implements ForwardWithSync, Explainab
|
||||
|
||||
boolean isPartialUpdate = targetTable.getEnableUniqueKeyMergeOnWrite()
|
||||
&& selectItems.size() < targetTable.getColumns().size()
|
||||
&& !targetTable.hasVariantColumns() && targetTable.getSequenceCol() == null
|
||||
&& targetTable.getSequenceCol() == null
|
||||
&& partialUpdateColNameToExpression.size() <= targetTable.getFullSchema().size() * 3 / 10;
|
||||
|
||||
List<String> partialUpdateColNames = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user