-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[feat](nereids) add rewrite rule :EliminateGroupByKeyByUniform #43391
[feat](nereids) add rewrite rule :EliminateGroupByKeyByUniform #43391
Conversation
run buildall |
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
import java.util.Map; | ||
import java.util.Set; | ||
|
||
/**ProjectFilterTransform*/ |
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.
class comment should contain what the rule want to do and how
run buildall |
TPC-H: Total hot run time: 41389 ms
|
run buildall |
TPC-H: Total hot run time: 41292 ms
|
e668096
to
452bb5f
Compare
run buildall |
0c01e45
to
6333e6f
Compare
run buildall |
6f13f10
to
892b7ec
Compare
run buildall |
6b4a551
to
852065c
Compare
run buidlall |
b393ff3
to
0c470a6
Compare
run buildall |
73c21af
to
c2bc25a
Compare
run buildall |
cdb345c
to
c99e369
Compare
run buildall |
1d2ad46
to
d211163
Compare
run buildall |
27e9155
to
1c2bb29
Compare
run buildall |
TPC-H: Total hot run time: 39943 ms
|
TPC-DS: Total hot run time: 191723 ms
|
ClickBench: Total hot run time: 32.14 s
|
run p0 |
sql "insert into test1 values(1,1),(2,1),(3,1);" | ||
sql "create table test2(a int, b int) distributed by hash(a) properties('replication_num'='1');" | ||
sql "insert into test2 values(1,105),(2,105);" | ||
qt_full_join_uniform_should_not_eliminate_group_by_key "select t2.b,t1.b from test1 t1 full join (select * from test2 where b=105) t2 on t1.a=t2.a group by t2.b,t1.b order by 1,2;" |
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.
does the original code have bug for this case?
PR approved by at least one committer and no changes requested. |
…e#43391) This PR introduces two main changes: 1. Adds an optional constant value to the uniform attribute in DataTrait. A slot with a constant value that is not null will be considered uniform and not null. 2. Introduces a new transform rule: EliminateGroupByKeyByUniform, which utilizes the newly added part of the uniform attribute. Following is example transformation: from +--aggregate(group by a,b output a,b,max(c)) (a is uniform and not null: e.g. a is projection 2 as a in logicalProject) to +--aggregate(group by b output b,any_value(a) as a,max(c))
What problem does this PR solve?
This PR introduces two main changes:
+--aggregate(group by a,b output a,b,max(c))
(a is uniform and not null: e.g. a is projection 2 as a in logicalProject)
->
+--aggregate(group by b output b,any_value(a) as a,max(c))
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Release note
None
Check List (For Reviewer who merge this PR)