[CALCITE-7162] AggregateMergeRule type mismatch on MIN/MAX - #4527
Conversation
|
|
If you have also updated the CountSplitter, I hope you can add a relevant test case. |
mihaibudiu
left a comment
There was a problem hiding this comment.
This looks fine, but it would be great if @julianhyde could confirm.
|
Can we have a generic solution that works for all aggregate functions? |
In this patch I updated all existing
I tried for a bit to find a case where the current |
|
Thanks all for having a look. I will commit it since I believe I've addressed the comments as best as they can be. |



Fixes CALCITE-7162 by taking the type from the top aggregator rather than the bottom aggregator when merging. A similar fix was made to
AbstractSumSplitterin CALCITE-6557.This patch also updates
CountSplitterwith 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.