Skip to content

Commit

Permalink
[branch-2.1] Picks "[Fix](schema change) Fix can't do reorder column …
Browse files Browse the repository at this point in the history
…schema change for MOW table and duplicate key table #37067" (#37226)

## Proposed changes

picks #37067
  • Loading branch information
bobhan1 authored Jul 3, 2024
1 parent 70e1c56 commit 69aebc2
Show file tree
Hide file tree
Showing 8 changed files with 155 additions and 441 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ private boolean processModifyColumn(ModifyColumnClause alterClause, OlapTable ol
}
if (!modColumn.isKey()) {
if (olapTable.getEnableUniqueKeyMergeOnWrite()) {
modColumn.setAggregationType(AggregateType.NONE, false);
modColumn.setAggregationType(AggregateType.NONE, true);
} else {
modColumn.setAggregationType(AggregateType.REPLACE, true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public void validate(boolean isOlap, Set<String> keysSet, boolean isEnableMergeO
}

if (isOlap) {
if (!isKey && keysType.equals(KeysType.UNIQUE_KEYS)) {
if (!isKey && (keysType.equals(KeysType.UNIQUE_KEYS) || keysType.equals(KeysType.DUP_KEYS))) {
aggTypeImplicit = true;
}

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
-- This file is automatically generated. You should know what you did if you want to edit this
-- !dup --
1 {"f1": "A", "f2": "B", "f3": 10, "f4": 3.14} {"f1": "C", "f2": "D", "f3": 20, "f4": 8.343} {"a":1,"b":[1],"c":1.0}

-- !dup --
1 {"f1": "A", "f2": "B", "f3": 10, "f4": 3.14} {"a":1,"b":[1],"c":1.0} {"f1": "C", "f2": "D", "f3": 20, "f4": 8.343}
2 {"f1": "E", "f2": "F", "f3": 30, "f4": 484.3234} {"a":1,"b":[1],"c":1.0} \N

-- !mor --
1 {"f1": "A", "f2": "B", "f3": 10, "f4": 3.14} {"f1": "C", "f2": "D", "f3": 20, "f4": 8.343} {"a":1,"b":[1],"c":1.0}

-- !mor --
1 {"f1": "A", "f2": "B", "f3": 10, "f4": 3.14} {"a":1,"b":[1],"c":1.0} {"f1": "C", "f2": "D", "f3": 20, "f4": 8.343}
2 {"f1": "E", "f2": "F", "f3": 30, "f4": 484.3234} {"a":1,"b":[1],"c":1.0} \N

-- !mow --
1 {"f1": "A", "f2": "B", "f3": 10, "f4": 3.14} {"f1": "C", "f2": "D", "f3": 20, "f4": 8.343} {"a":1,"b":[1],"c":1.0}

-- !mow --
1 {"f1": "A", "f2": "B", "f3": 10, "f4": 3.14} {"a":1,"b":[1],"c":1.0} {"f1": "C", "f2": "D", "f3": 20, "f4": 8.343}
2 {"f1": "E", "f2": "F", "f3": 30, "f4": 484.3234} {"a":1,"b":[1],"c":1.0} \N

This file was deleted.

Loading

0 comments on commit 69aebc2

Please sign in to comment.