[fix](nereids) Use correct PREAGGREGATION in agg(filter(scan))#33454
[fix](nereids) Use correct PREAGGREGATION in agg(filter(scan))#33454morningman merged 5 commits intoapache:masterfrom
Conversation
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
|
@BiteTheDDDDt hello, do you have time to see this pr? |
|
run buildall |
| boolean contains = containsAllColumn(aggFunc.child(0), ctx.keyNameToColumn.keySet()); | ||
| if (contains || ctx.keyNameToColumn.containsKey(childNameWithFuncName)) { | ||
| if (ctx.isDupKeysOrMergeOnWrite || (!ctx.isBaseIndex() && contains)) { | ||
| if (canUseKeyColumn || ctx.isDupKeysOrMergeOnWrite || (!ctx.isBaseIndex() && contains)) { |
There was a problem hiding this comment.
maybe we can use ctx.isBaseIndex() to replace canUseKeyColumn?
There was a problem hiding this comment.
It doesn't seem to work.
...ain/java/org/apache/doris/nereids/rules/rewrite/mv/SelectMaterializedIndexWithAggregate.java
Show resolved
Hide resolved
|
run feut |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
|
run buildall |
|
run buildall |
|
PR approved by at least one committer and no changes requested. |
|
run buildall |
TPC-H: Total hot run time: 38325 ms |
TPC-DS: Total hot run time: 183712 ms |
ClickBench: Total hot run time: 30.28 s |
|
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G' |
|
@morrySnow Hi, Wenxin. This PR is ready for merge. Do you have time to have a look at it? |
| } | ||
|
|
||
| qt_right_when_preagg_on "select k1, min(k2), max(k3) from test_scan_preaggregation where k1 = 1 group by k1;" | ||
| qt_right_when_preagg_off "select k1, sum(v1) from test_scan_preaggregation group by k1;" |
There was a problem hiding this comment.
qt_right_when_preagg_off is misleading, the preagg should be on ? and please use explain to verify the preagg status
There was a problem hiding this comment.
Sorry, I was originally going to test aggregation on key columns. I modified the test sql.
|
run buildall |
TPC-H: Total hot run time: 38509 ms |
TPC-DS: Total hot run time: 183093 ms |
ClickBench: Total hot run time: 30.41 s |
|
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G' |
|
@starocean999 Hi, I fix the regression test case, can you take another look at this PR? |
|
PR approved by at least one committer and no changes requested. |
1. set `PreAggStatus` to `ON` when agg key column by max or min; 2. #28747 may change `PreAggStatus` of scan, inherit it from the previous one.
1. set `PreAggStatus` to `ON` when agg key column by max or min; 2. #28747 may change `PreAggStatus` of scan, inherit it from the previous one.
1. set `PreAggStatus` to `ON` when agg key column by max or min; 2. #28747 may change `PreAggStatus` of scan, inherit it from the previous one.
Proposed changes
Issue Number: close #33351
PreAggStatustoONwhen agg key column by max or min;PreAggStatusof scan, inherit it from the previous one.Further comments
Further regression test case will be conducted later.