-
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
[bug](delete) fix delete random distributed tbl #37985
[bug](delete) fix delete random distributed tbl #37985
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
run buildall |
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.
add test case please
TPC-H: Total hot run time: 39822 ms
|
TPC-DS: Total hot run time: 174371 ms
|
ClickBench: Total hot run time: 30.69 s
|
done |
TPC-H: Total hot run time: 39806 ms
|
TPC-DS: Total hot run time: 172758 ms
|
ClickBench: Total hot run time: 31.43 s
|
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
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
## Proposed changes Bug description: In PR #33630, Doris supports auto aggregation for random distributed table, but it not only effects query statements, so if we delete from a random distributed table, will get an error because of unexpectedly rewriting. ``` CREATE TABLE `test_tbl` ( `k` INT NULL, `v` BIGINT SUM NULL ) ENGINE=OLAP AGGREGATE KEY(`k`) DISTRIBUTED BY RANDOM BUCKETS AUTO; mysql > delete from test_tbl where k=1; ERROR 1105 (HY000): errCode = 2, detailMessage = Where clause only supports compound predicate, binary predicate, is_null predicate or in predicate. ``` fix: Check whether it is a query statement before rewriting.
## Proposed changes cherry-pick #37985 <!--Describe your changes.-->
## Proposed changes After pr #37985, explain will not be rewritten for querying random distributed table, so remove explain action in regression test case. <!--Describe your changes.-->
## Proposed changes After pr #37985, explain will not be rewritten for querying random distributed table, so remove explain action in regression test case. <!--Describe your changes.-->
Proposed changes
Bug description:
In PR #33630, Doris supports auto aggregation for random distributed table, but it not only effects query statements, so if we delete from a random distributed table, will get an error because of unexpectedly rewriting.
fix:
Check whether it is a query statement before rewriting.