-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Bug] Can not use non-key column as partition column in duplicate table #3916
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
Conversation
c72a284 to
728b601
Compare
fe/src/main/java/org/apache/doris/analysis/RangePartitionDesc.java
Outdated
Show resolved
Hide resolved
| for (Column column : schema) { | ||
| if (column.getName().equalsIgnoreCase(colName)) { | ||
| if (!column.isKey()) { | ||
| if (!column.isKey() && column.getAggregationType() != AggregateType.NONE) { |
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 does it need a second check here?
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.
Historical issues...
It is OK, may be removed in future.
…java Co-authored-by: EmmyMiao87 <522274284@qq.com>
fe/src/main/java/org/apache/doris/analysis/RangePartitionDesc.java
Outdated
Show resolved
Hide resolved
…java Co-authored-by: EmmyMiao87 <522274284@qq.com>
EmmyMiao87
left a comment
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
…le (apache#3916) The following statement will throw error: ``` create table test.tbl2 (k1 int, k2 int, k3 float) duplicate key(k1) partition by range(k2) (partition p1 values less than("10")) distributed by hash(k3) buckets 1 properties('replication_num' = '1'); ``` Error: `Only key column can be partition column` But in duplicate key table, columns can be partition or distribution column even if they are not in duplicate keys. This bug is introduced by apache#3812
… policy on unique table (apache#49905) (apache#3916) pick apache#49905
… policy on unique table (apache#49905) (apache#3916) pick apache#49905
The following statement will throw error:
Error:
Only key column can be partition columnBut in duplicate key table, columns can be partition or distribution column
even if they are not in duplicate keys.
This bug is introduced by #3812