-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix errors when alter materialized view which based on dup table #4375
Conversation
1. Input the correct keys type when mv is updated. The keys type of mv should be used in schema change job rather then keys type of base table. Otherwise, the be will core and thrown exception "Create replicas failed". 2. Forbidden add non-key column on agg mv directly when base table is duplicate model If a dup table has a agg mv, user will not add a non-key column on mv. The non-key column can only be added to dup index. Fixed apache#4374 Change-Id: I375f695b3109e513622110cf0ca04a4034780909
@@ -556,6 +556,10 @@ private void addColumnInternal(OlapTable olapTable, Column newColumn, ColumnPosi | |||
throw new DdlException("Can not assign aggregation method on column in Duplicate data model table: " + newColName); | |||
} | |||
if (!newColumn.isKey()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not put "from lint 559 to line 562" outside of if stmt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't understand what you mean...
fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java
Outdated
Show resolved
Hide resolved
Change-Id: Ifb3b3ad2ba44770a2a0fcf0317f63e3e508161da
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…apache#4375) 1. Input the correct keys type when mv is updated. The keys type of mv should be used in schema change job rather then keys type of base table. Otherwise, the be will core and thrown exception "Create replicas failed". 2. Forbidden add non-key column on agg mv directly when base table is duplicate model If a dup table has a agg mv, user will not add a non-key column on mv. The non-key column can only be added to dup index.
Proposed changes
Input the correct keys type when mv is updated.
The keys type of mv should be used in schema change job rather then keys type of base table.
Otherwise, the be will core and thrown exception "Create replicas failed".
Forbidden add non-key column on agg mv directly when base table is duplicate model
If a dup table has a agg mv, user will not add a non-key column on mv.
The non-key column can only be added to dup index.
Fixed #4374
Change-Id: I375f695b3109e513622110cf0ca04a4034780909
Types of changes
What types of changes does your code introduce to Doris?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.