You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "englefly (via GitHub)" <gi...@apache.org> on 2025/10/23 06:16:47 UTC

[PR] Agg cse shufflekey [doris]

englefly opened a new pull request, #57258:
URL: https://github.com/apache/doris/pull/57258

   ### What problem does this PR solve?
   
   Issue Number: close #xxx
   
   Related PR: #xxx
   
   Problem Summary:
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [ ] Regression test
       - [ ] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason <!-- Add your reason?  -->
   
   - Behavior changed:
       - [ ] No.
       - [ ] Yes. <!-- Explain the behavior change -->
   
   - Does this need documentation?
       - [ ] No.
       - [ ] Yes. <!-- Add document PR link here. eg: https://github.com/apache/doris-website/pull/1214 -->
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](nereids) adjust distribute expr lists after project common sub expression for aggregation [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #57258:
URL: https://github.com/apache/doris/pull/57258#issuecomment-3435761292

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 28.78 s</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
   ClickBench test result on commit 48fad2ad27ef4e08e69d537bd0ce42de898648c8, data reload: false
   
   query1	0.07	0.05	0.05
   query2	0.10	0.06	0.06
   query3	0.25	0.09	0.09
   query4	1.62	0.12	0.12
   query5	0.28	0.27	0.28
   query6	1.18	0.66	0.68
   query7	0.04	0.03	0.02
   query8	0.06	0.05	0.05
   query9	0.63	0.56	0.54
   query10	0.61	0.60	0.60
   query11	0.18	0.12	0.12
   query12	0.17	0.13	0.12
   query13	0.63	0.62	0.60
   query14	1.05	1.01	1.05
   query15	0.88	0.90	0.87
   query16	0.41	0.41	0.41
   query17	1.12	1.10	1.20
   query18	0.23	0.22	0.21
   query19	2.04	1.84	1.88
   query20	0.02	0.02	0.01
   query21	15.36	0.19	0.13
   query22	5.06	0.07	0.05
   query23	15.66	0.29	0.12
   query24	2.53	0.69	0.68
   query25	0.08	0.07	0.06
   query26	0.16	0.14	0.14
   query27	0.08	0.06	0.06
   query28	4.96	1.18	0.96
   query29	12.66	4.29	3.55
   query30	0.28	0.14	0.12
   query31	2.83	0.62	0.41
   query32	3.24	0.57	0.49
   query33	3.18	3.21	3.12
   query34	15.97	5.18	4.62
   query35	4.66	4.63	4.60
   query36	0.72	0.53	0.52
   query37	0.11	0.08	0.08
   query38	0.07	0.05	0.05
   query39	0.04	0.03	0.04
   query40	0.18	0.15	0.14
   query41	0.10	0.03	0.03
   query42	0.05	0.04	0.03
   query43	0.05	0.04	0.04
   Total cold run time: 99.6 s
   Total hot run time: 28.78 s
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](nereids) adjust distribute expr lists after project common sub expression for aggregation [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #57258:
URL: https://github.com/apache/doris/pull/57258#issuecomment-3436359615

   # FE Regression Coverage Report
   Increment line coverage `  93.75% (15/16)` :tada:
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/57258_48fad2ad27ef4e08e69d537bd0ce42de898648c8_merge_fe/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/57258_48fad2ad27ef4e08e69d537bd0ce42de898648c8_merge_fe/report/index.html)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](nereids) adjust distribute expr lists after project common sub expression for aggregation [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #57258:
URL: https://github.com/apache/doris/pull/57258#issuecomment-3467253888

   PR approved by at least one committer and no changes requested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](nereids) adjust distribute expr lists after project common sub expression for aggregation [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #57258:
URL: https://github.com/apache/doris/pull/57258#issuecomment-3435750316

   # FE UT Coverage Report
   Increment line coverage `  56.25% (9/16)` :tada:
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/57258_48fad2ad27ef4e08e69d537bd0ce42de898648c8/fe_increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/57258_48fad2ad27ef4e08e69d537bd0ce42de898648c8/fe_report/index.html)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](nereids) adjust distribute expr lists after project common sub expression for aggregation [doris]

Posted by "englefly (via GitHub)" <gi...@apache.org>.
englefly commented on code in PR #57258:
URL: https://github.com/apache/doris/pull/57258#discussion_r2476230667


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/properties/ChildOutputPropertyDeriver.java:
##########
@@ -345,22 +346,41 @@ && isSameHashValue(child.child(0).getDataType(), child.getDataType())) {
                                         .map(NamedExpression::getExprId)
                                         .collect(Collectors.toSet()));
                     }
+                } else {
+                    // namedExpression is slot
+                    projections.put(namedExpression.getExprId(), namedExpression.getExprId());
                 }
             }
-            if (projections.entrySet().stream().allMatch(kv -> kv.getKey().equals(kv.getValue()))) {
-                return childrenOutputProperties.get(0);
-            }
+
             DistributionSpecHash childDistributionSpecHash = (DistributionSpecHash) childDistributionSpec;
+            boolean canUseChildProperties = true;
+            for (ExprId exprId : childDistributionSpecHash.getOrderedShuffledColumns()) {
+                if (!projections.containsKey(exprId) || !projections.get(exprId).equals(exprId)) {
+                    canUseChildProperties = false;

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](nereids) adjust distribute expr lists after project common sub expression for aggregation [doris]

Posted by "englefly (via GitHub)" <gi...@apache.org>.
englefly commented on PR #57258:
URL: https://github.com/apache/doris/pull/57258#issuecomment-3465884826

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](nereids) adjust distribute expr lists after project common sub expression for aggregation [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #57258:
URL: https://github.com/apache/doris/pull/57258#issuecomment-3459318923

   PR approved by at least one committer and no changes requested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](nereids) adjust distribute expr lists after project common sub expression for aggregation [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #57258:
URL: https://github.com/apache/doris/pull/57258#issuecomment-3466150066

   # FE Regression Coverage Report
   Increment line coverage `  95.24% (20/21)` :tada:
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/57258_b77989b674d3d15ea4589e7846c235d089171503_merge_fe/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/57258_b77989b674d3d15ea4589e7846c235d089171503_merge_fe/report/index.html)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](nereids) adjust distribute expr lists after project common sub expression for aggregation [doris]

Posted by "morrySnow (via GitHub)" <gi...@apache.org>.
morrySnow commented on code in PR #57258:
URL: https://github.com/apache/doris/pull/57258#discussion_r2454102538


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/properties/ChildOutputPropertyDeriver.java:
##########
@@ -319,17 +319,15 @@ public PhysicalProperties visitPhysicalNestedLoopJoin(
         return new PhysicalProperties(leftOutputProperty.getDistributionSpec());
     }
 
-    @Override
-    public PhysicalProperties visitPhysicalProject(PhysicalProject<? extends Plan> project, PlanContext context) {
-        // TODO: order spec do not process since we do not use it.
-        Preconditions.checkState(childrenOutputProperties.size() == 1);
-        PhysicalProperties childProperties = childrenOutputProperties.get(0);
+    public static PhysicalProperties computeProjectOutputProperties(

Review Comment:
   add ut for it



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](nereids) adjust distribute expr lists after project common sub expression for aggregation [doris]

Posted by "englefly (via GitHub)" <gi...@apache.org>.
englefly commented on PR #57258:
URL: https://github.com/apache/doris/pull/57258#issuecomment-3437346600

   run vault_p0


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](nereids) adjust distribute expr lists after project common sub expression for aggregation [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #57258:
URL: https://github.com/apache/doris/pull/57258#issuecomment-3437356802

   # FE Regression Coverage Report
   Increment line coverage `  95.00% (19/20)` :tada:
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/57258_3e53f1da3facd5896ddfc79853c0f1fc6c6bd67e_merge_fe/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/57258_3e53f1da3facd5896ddfc79853c0f1fc6c6bd67e_merge_fe/report/index.html)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](nereids) adjust distribute expr lists after project common sub expression for aggregation [doris]

Posted by "englefly (via GitHub)" <gi...@apache.org>.
englefly commented on code in PR #57258:
URL: https://github.com/apache/doris/pull/57258#discussion_r2454179897


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/properties/ChildOutputPropertyDeriver.java:
##########
@@ -319,17 +319,15 @@ public PhysicalProperties visitPhysicalNestedLoopJoin(
         return new PhysicalProperties(leftOutputProperty.getDistributionSpec());
     }
 
-    @Override
-    public PhysicalProperties visitPhysicalProject(PhysicalProject<? extends Plan> project, PlanContext context) {
-        // TODO: order spec do not process since we do not use it.
-        Preconditions.checkState(childrenOutputProperties.size() == 1);
-        PhysicalProperties childProperties = childrenOutputProperties.get(0);
+    public static PhysicalProperties computeProjectOutputProperties(

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](nereids) adjust distribute expr lists after project common sub expression for aggregation [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #57258:
URL: https://github.com/apache/doris/pull/57258#issuecomment-3459318983

   PR approved by anyone and no changes requested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](nereids) adjust distribute expr lists after project common sub expression for aggregation [doris]

Posted by "englefly (via GitHub)" <gi...@apache.org>.
englefly commented on code in PR #57258:
URL: https://github.com/apache/doris/pull/57258#discussion_r2454108364


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/properties/ChildOutputPropertyDeriver.java:
##########
@@ -319,17 +319,15 @@ public PhysicalProperties visitPhysicalNestedLoopJoin(
         return new PhysicalProperties(leftOutputProperty.getDistributionSpec());
     }
 
-    @Override
-    public PhysicalProperties visitPhysicalProject(PhysicalProject<? extends Plan> project, PlanContext context) {
-        // TODO: order spec do not process since we do not use it.
-        Preconditions.checkState(childrenOutputProperties.size() == 1);
-        PhysicalProperties childProperties = childrenOutputProperties.get(0);
+    public static PhysicalProperties computeProjectOutputProperties(

Review Comment:
   already add regression case.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](nereids) adjust distribute expr lists after project common sub expression for aggregation [doris]

Posted by "englefly (via GitHub)" <gi...@apache.org>.
englefly commented on PR #57258:
URL: https://github.com/apache/doris/pull/57258#issuecomment-3436478703

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] Agg cse shufflekey [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #57258:
URL: https://github.com/apache/doris/pull/57258#issuecomment-3435341443

   
   Thank you for your contribution to Apache Doris.
   Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/How+to+process+your+PR).
   
   Please clearly describe your PR:
   1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
   2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
   3. What features were added. Why was this function added?
   4. Which code was refactored and why was this part of the code refactored?
   5. Which functions were optimized and what is the difference before and after the optimization?
       


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](nereids) adjust distribute expr lists after project common sub expression for aggregation [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #57258:
URL: https://github.com/apache/doris/pull/57258#issuecomment-3465944089

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 29.08 s</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
   ClickBench test result on commit b77989b674d3d15ea4589e7846c235d089171503, data reload: false
   
   query1	0.06	0.06	0.06
   query2	0.11	0.06	0.06
   query3	0.26	0.09	0.09
   query4	1.62	0.12	0.12
   query5	0.29	0.27	0.26
   query6	1.18	0.67	0.67
   query7	0.04	0.03	0.03
   query8	0.06	0.05	0.06
   query9	0.63	0.55	0.54
   query10	0.60	0.60	0.60
   query11	0.18	0.12	0.12
   query12	0.16	0.13	0.14
   query13	0.63	0.62	0.61
   query14	1.02	1.04	1.05
   query15	0.90	0.89	0.86
   query16	0.41	0.42	0.41
   query17	1.04	1.07	1.10
   query18	0.23	0.21	0.22
   query19	2.01	1.90	1.88
   query20	0.03	0.02	0.02
   query21	15.40	0.20	0.13
   query22	4.99	0.08	0.05
   query23	15.63	0.30	0.11
   query24	2.37	1.03	1.04
   query25	0.08	0.07	0.06
   query26	0.16	0.15	0.17
   query27	0.07	0.06	0.06
   query28	5.38	1.17	0.94
   query29	12.60	4.31	3.53
   query30	0.28	0.15	0.11
   query31	2.82	0.61	0.39
   query32	3.24	0.57	0.50
   query33	3.04	3.11	3.17
   query34	15.95	5.21	4.58
   query35	4.68	4.60	4.61
   query36	0.71	0.51	0.51
   query37	0.11	0.07	0.08
   query38	0.07	0.05	0.04
   query39	0.04	0.03	0.03
   query40	0.18	0.16	0.15
   query41	0.10	0.04	0.04
   query42	0.05	0.04	0.03
   query43	0.04	0.04	0.03
   Total cold run time: 99.45 s
   Total hot run time: 29.08 s
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](nereids) adjust distribute expr lists after project common sub expression for aggregation [doris]

Posted by "englefly (via GitHub)" <gi...@apache.org>.
englefly commented on PR #57258:
URL: https://github.com/apache/doris/pull/57258#issuecomment-3435536576

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](nereids) adjust distribute expr lists after project common sub expression for aggregation [doris]

Posted by "englefly (via GitHub)" <gi...@apache.org>.
englefly commented on PR #57258:
URL: https://github.com/apache/doris/pull/57258#issuecomment-3435518179

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](nereids) adjust distribute expr lists after project common sub expression for aggregation [doris]

Posted by "feiniaofeiafei (via GitHub)" <gi...@apache.org>.
feiniaofeiafei commented on code in PR #57258:
URL: https://github.com/apache/doris/pull/57258#discussion_r2472544260


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/properties/ChildOutputPropertyDeriver.java:
##########
@@ -345,22 +346,41 @@ && isSameHashValue(child.child(0).getDataType(), child.getDataType())) {
                                         .map(NamedExpression::getExprId)
                                         .collect(Collectors.toSet()));
                     }
+                } else {
+                    // namedExpression is slot
+                    projections.put(namedExpression.getExprId(), namedExpression.getExprId());
                 }
             }
-            if (projections.entrySet().stream().allMatch(kv -> kv.getKey().equals(kv.getValue()))) {
-                return childrenOutputProperties.get(0);
-            }
+
             DistributionSpecHash childDistributionSpecHash = (DistributionSpecHash) childDistributionSpec;
+            boolean canUseChildProperties = true;
+            for (ExprId exprId : childDistributionSpecHash.getOrderedShuffledColumns()) {
+                if (!projections.containsKey(exprId) || !projections.get(exprId).equals(exprId)) {
+                    canUseChildProperties = false;

Review Comment:
   can break early here



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](nereids) adjust distribute expr lists after project common sub expression for aggregation [doris]

Posted by "englefly (via GitHub)" <gi...@apache.org>.
englefly merged PR #57258:
URL: https://github.com/apache/doris/pull/57258


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] Agg cse shufflekey [doris]

Posted by "englefly (via GitHub)" <gi...@apache.org>.
englefly commented on PR #57258:
URL: https://github.com/apache/doris/pull/57258#issuecomment-3435415609

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](nereids) adjust distribute expr lists after project common sub expression for aggregation [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #57258:
URL: https://github.com/apache/doris/pull/57258#issuecomment-3436669637

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 28.25 s</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
   ClickBench test result on commit 3e53f1da3facd5896ddfc79853c0f1fc6c6bd67e, data reload: false
   
   query1	0.06	0.05	0.04
   query2	0.09	0.05	0.06
   query3	0.25	0.08	0.08
   query4	1.61	0.12	0.12
   query5	0.28	0.26	0.25
   query6	1.17	0.67	0.66
   query7	0.04	0.03	0.03
   query8	0.05	0.04	0.04
   query9	0.63	0.55	0.53
   query10	0.60	0.59	0.59
   query11	0.17	0.12	0.12
   query12	0.15	0.12	0.12
   query13	0.62	0.61	0.61
   query14	1.02	1.02	1.03
   query15	0.86	0.86	0.89
   query16	0.40	0.40	0.40
   query17	1.05	1.04	1.06
   query18	0.22	0.21	0.20
   query19	1.94	1.81	1.91
   query20	0.02	0.01	0.02
   query21	15.44	0.19	0.13
   query22	5.10	0.07	0.06
   query23	15.69	0.28	0.10
   query24	2.96	0.76	0.79
   query25	0.09	0.07	0.06
   query26	0.15	0.14	0.14
   query27	0.06	0.06	0.05
   query28	5.22	1.16	0.95
   query29	12.57	4.02	3.29
   query30	0.29	0.14	0.12
   query31	2.83	0.64	0.39
   query32	3.24	0.56	0.49
   query33	3.06	3.13	3.07
   query34	15.83	5.20	4.58
   query35	4.65	4.62	4.60
   query36	0.67	0.53	0.51
   query37	0.10	0.08	0.07
   query38	0.07	0.05	0.04
   query39	0.04	0.02	0.03
   query40	0.17	0.17	0.14
   query41	0.08	0.04	0.04
   query42	0.04	0.04	0.03
   query43	0.04	0.04	0.03
   Total cold run time: 99.62 s
   Total hot run time: 28.25 s
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org