You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by "gianm (via GitHub)" <gi...@apache.org> on 2025/09/07 06:04:53 UTC

[PR] [CALCITE-7162] AggregateMergeRule type mismatch on MIN/MAX [calcite]

gianm opened a new pull request, #4527:
URL: https://github.com/apache/calcite/pull/4527

   Fixes [CALCITE-7162](https://issues.apache.org/jira/browse/CALCITE-7162) by taking the type from the top aggregator rather than the bottom aggregator when merging. A similar fix was made to `AbstractSumSplitter` in [CALCITE-6557](https://issues.apache.org/jira/browse/CALCITE-6557).
   
   This patch also updates `CountSplitter` with a similar change— just in case— even though I'm not sure if that is necessary to fix any actual bug. I believe that in general using the top aggregator type is the correct thing to do, since the merged aggregator is meant to stand in for the top aggregator.


-- 
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@calcite.apache.org

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


Re: [PR] [CALCITE-7162] AggregateMergeRule type mismatch on MIN/MAX [calcite]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #4527:
URL: https://github.com/apache/calcite/pull/4527#issuecomment-3263536161

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=4527) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=4527&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=4527&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=4527&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [100.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=4527&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=4527&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=4527)
   
   


-- 
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@calcite.apache.org

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


Re: [PR] [CALCITE-7162] AggregateMergeRule type mismatch on MIN/MAX [calcite]

Posted by "gianm (via GitHub)" <gi...@apache.org>.
gianm commented on PR #4527:
URL: https://github.com/apache/calcite/pull/4527#issuecomment-3287016251

   Thanks all for having a look. I will commit it since I believe I've addressed the comments as best as they can be.


-- 
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@calcite.apache.org

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


Re: [PR] [CALCITE-7162] AggregateMergeRule type mismatch on MIN/MAX [calcite]

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


-- 
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@calcite.apache.org

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


Re: [PR] [CALCITE-7162] AggregateMergeRule type mismatch on MIN/MAX [calcite]

Posted by "gianm (via GitHub)" <gi...@apache.org>.
gianm commented on PR #4527:
URL: https://github.com/apache/calcite/pull/4527#issuecomment-3267903512

   > Can we have a generic solution that works for all aggregate functions?
   
   In this patch I updated all existing `SqlSplittableAggFunction` implementations. If there is something more generic you had in mind, please let me know.
   
   > If you have also updated the CountSplitter, I hope you can add a relevant test case.
   
   I tried for a bit to find a case where the current `CountSplitter` breaks, but couldn't, so I didn't add a test case. There are already a lot of test cases for `COUNT` splitting. It's possible the current code is "fine" because `COUNT` splits into `COUNT` and `SUM0`, which won't have different nullability. I updated the `CountSplitter` anyway just to keep all the Splitter implementations harmonious.


-- 
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@calcite.apache.org

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


Re: [PR] [CALCITE-7162] AggregateMergeRule type mismatch on MIN/MAX [calcite]

Posted by "xiedeyantu (via GitHub)" <gi...@apache.org>.
xiedeyantu commented on PR #4527:
URL: https://github.com/apache/calcite/pull/4527#issuecomment-3263631789

   If you have also updated the CountSplitter, I hope you can add a relevant test 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@calcite.apache.org

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


Re: [PR] [CALCITE-7162] AggregateMergeRule type mismatch on MIN/MAX [calcite]

Posted by "julianhyde (via GitHub)" <gi...@apache.org>.
julianhyde commented on PR #4527:
URL: https://github.com/apache/calcite/pull/4527#issuecomment-3267503392

   Can we have a generic solution that works for all aggregate functions?


-- 
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@calcite.apache.org

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