Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,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 Expand Up @@ -928,7 +928,7 @@ private boolean addColumnInternal(OlapTable olapTable, Column newColumn, ColumnP
}
if (!newColumn.isKey()) {
if (olapTable.getEnableUniqueKeyMergeOnWrite()) {
newColumn.setAggregationType(AggregateType.NONE, false);
newColumn.setAggregationType(AggregateType.NONE, true);
} else {
newColumn.setAggregationType(AggregateType.REPLACE, true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,8 @@ public void analyze(Analyzer analyzer) throws UserException, AnalysisException {

for (ColumnDef columnDef : columnDefs) {
Column col = columnDef.toColumn();
if (keysDesc != null && keysDesc.getKeysType() == KeysType.UNIQUE_KEYS) {
if (keysDesc != null && (keysDesc.getKeysType() == KeysType.UNIQUE_KEYS
|| keysDesc.getKeysType() == KeysType.DUP_KEYS)) {
if (!col.isKey()) {
col.setAggregationTypeImplicit(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} 10

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

-- !mor --
1 {"f1": "A", "f2": "B", "f3": 10, "f4": 3.14} {"f1": "C", "f2": "D", "f3": 20, "f4": 8.343} 10

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

-- !mow --
1 {"f1": "A", "f2": "B", "f3": 10, "f4": 3.14} {"f1": "C", "f2": "D", "f3": 20, "f4": 8.343} 10

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

This file was deleted.

Loading