Skip to content

Commit

Permalink
[fix](unique key) getEnableUniqueKeyMergeOnWrite should check keys ty…
Browse files Browse the repository at this point in the history
…pe (apache#44692)

Problem Summary:

Some user can create Duplicate keys table with
`enable_unique_key_merge_on_write=true` in version 1.2, when they
upgrade to version 2.0, some logic in BE treat such table as an unique
key mow table, make a wrong query plan, which cause BE core.

In the method `OlapTable::getEnableUniqueKeyMergeOnWrite()`, we should
check if the table is a unique key table.
  • Loading branch information
zhannngchen committed Dec 3, 2024
1 parent 74e085c commit 29ff58c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2713,6 +2713,9 @@ public boolean getEnableUniqueKeyMergeOnWrite() {
if (tableProperty == null) {
return false;
}
if (getKeysType() != KeysType.UNIQUE_KEYS) {
return false;
}
return tableProperty.getEnableUniqueKeyMergeOnWrite();
}

Expand Down

0 comments on commit 29ff58c

Please sign in to comment.