[fix](partial update) keep case insensitivity and use the columns' origin names in partialUpdateCols in origin planner (#27223)
close: #27161
This commit is contained in:
@ -1156,7 +1156,7 @@ public class NativeInsertStmt extends InsertStmt {
|
||||
for (Column col : olapTable.getFullSchema()) {
|
||||
boolean exists = false;
|
||||
for (Column insertCol : targetColumns) {
|
||||
if (insertCol.getName() != null && insertCol.getName().equals(col.getName())) {
|
||||
if (insertCol.getName() != null && insertCol.getName().equalsIgnoreCase(col.getName())) {
|
||||
if (!col.isVisible() && !Column.DELETE_SIGN.equals(col.getName())) {
|
||||
throw new UserException("Partial update should not include invisible column except"
|
||||
+ " delete sign column: " + col.getName());
|
||||
@ -1171,7 +1171,11 @@ public class NativeInsertStmt extends InsertStmt {
|
||||
}
|
||||
|
||||
isPartialUpdate = true;
|
||||
partialUpdateCols.addAll(targetColumnNames);
|
||||
for (String name : targetColumnNames) {
|
||||
Column column = olapTable.getFullSchema().stream()
|
||||
.filter(col -> col.getName().equalsIgnoreCase(name)).findFirst().get();
|
||||
partialUpdateCols.add(column.getName());
|
||||
}
|
||||
if (isPartialUpdate && olapTable.hasSequenceCol() && olapTable.getSequenceMapCol() != null
|
||||
&& partialUpdateCols.contains(olapTable.getSequenceMapCol())) {
|
||||
partialUpdateCols.add(Column.SEQUENCE_COL);
|
||||
|
||||
Reference in New Issue
Block a user