[Fix](nereids) modify the binding aggregate function in order by#32758
Merged
morrySnow merged 7 commits intoapache:masterfrom Apr 3, 2024
Merged
[Fix](nereids) modify the binding aggregate function in order by#32758morrySnow merged 7 commits intoapache:masterfrom
morrySnow merged 7 commits intoapache:masterfrom
Conversation
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 38644 ms |
TPC-DS: Total hot run time: 187092 ms |
|
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G' |
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 38245 ms |
TPC-DS: Total hot run time: 186656 ms |
|
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G' |
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 38849 ms |
TPC-DS: Total hot run time: 181670 ms |
|
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G' |
Contributor
|
add description |
924060929
reviewed
Mar 26, 2024
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 37716 ms |
TPC-DS: Total hot run time: 181052 ms |
|
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G' |
924060929
previously approved these changes
Mar 29, 2024
Contributor
|
PR approved by at least one committer and no changes requested. |
Contributor
|
PR approved by anyone and no changes requested. |
starocean999
previously approved these changes
Apr 1, 2024
d232508
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 39522 ms |
TPC-DS: Total hot run time: 180809 ms |
ClickBench: Total hot run time: 30.01 s |
|
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G' |
924060929
approved these changes
Apr 3, 2024
Contributor
|
PR approved by at least one committer and no changes requested. |
starocean999
approved these changes
Apr 3, 2024
yiguolei
pushed a commit
that referenced
this pull request
Apr 10, 2024
) modify the bind logical to make the order by has same behavior with mysql when sort child is aggregate. when an order by Expr has aggregate function, all slots in this order by Expr should bind the LogicalAggregate non-AggFunction outputs first, then bind the LogicalAggregate Child e.g. select 2*abs(sum(c1)) as c1, c1,sum(c1)+c1 from t_order_by_bind_priority group by c1 order by sum(c1)+c1 asc; in this sql, the two c1 in order by all bind to the c1 in t_order_by_bind_priority
morrySnow
pushed a commit
that referenced
this pull request
May 16, 2024
) Do same job with pr #32758 and pr #33843. Because the master branch2.0 differ in binding order by expressions. So this pr is not a cherry-pick, but actually does same job. For each order by expression: If it does not have aggregate functions, firstly bind expression from aggregate outputs. If not found, then bind expression from aggregate child outputs. If it has aggregate functions, firstly bind expression from aggregate outputs which do not have aggregate functions. If not found, then bind expression from aggregate child outputs. Co-authored-by: feiniaofeiafei <moailing@selectdb.com>
mongo360
pushed a commit
to mongo360/doris
that referenced
this pull request
Aug 16, 2024
…che#34606) Do same job with pr apache#32758 and pr apache#33843. Because the master branch2.0 differ in binding order by expressions. So this pr is not a cherry-pick, but actually does same job. For each order by expression: If it does not have aggregate functions, firstly bind expression from aggregate outputs. If not found, then bind expression from aggregate child outputs. If it has aggregate functions, firstly bind expression from aggregate outputs which do not have aggregate functions. If not found, then bind expression from aggregate child outputs. Co-authored-by: feiniaofeiafei <moailing@selectdb.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
modify the bind logical to make the order by has same behavior with mysql when sort child is aggregate.
when an order by Expr has aggregate function, all slots in this order by Expr should bind the LogicalAggregate non-AggFunction outputs first, then bind the LogicalAggregate Child
e.g.
select 2*abs(sum(c1)) as c1, c1,sum(c1)+c1 from t_order_by_bind_priority group by c1 order by sum(c1)+c1 asc;
in this sql, the two c1 in order by all bind to the c1 in t_order_by_bind_priority