[branch-2.1] Picks "[Fix](schema change) Fix can't do reorder column schema change for MOW table and duplicate key table #37067" (#37226)
## Proposed changes picks https://github.com/apache/doris/pull/37067
This commit is contained in:
@ -539,7 +539,7 @@ public class SchemaChangeHandler extends AlterHandler {
|
||||
}
|
||||
if (!modColumn.isKey()) {
|
||||
if (olapTable.getEnableUniqueKeyMergeOnWrite()) {
|
||||
modColumn.setAggregationType(AggregateType.NONE, false);
|
||||
modColumn.setAggregationType(AggregateType.NONE, true);
|
||||
} else {
|
||||
modColumn.setAggregationType(AggregateType.REPLACE, true);
|
||||
}
|
||||
|
||||
@ -264,7 +264,7 @@ public class ColumnDefinition {
|
||||
}
|
||||
|
||||
if (isOlap) {
|
||||
if (!isKey && keysType.equals(KeysType.UNIQUE_KEYS)) {
|
||||
if (!isKey && (keysType.equals(KeysType.UNIQUE_KEYS) || keysType.equals(KeysType.DUP_KEYS))) {
|
||||
aggTypeImplicit = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user