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

   JIRA:[CALCITE-7134](https://issues.apache.org/jira/browse/CALCITE-7134)
   As discussed in the JIRA, `groupCount` is not sufficient to indicate whether 
an Aggregate has empty groups. ROLLUP, CUBE, GROUPING SETS, and their 
combinations need to be more fully considered. This PR has made the following 
changes:
   
   1. Because the `int getGroupCount()` method in SqlOperatorBinding is only 
used for type inference of some aggregate functions, it is redefined as 
`boolean hasEmptyGroup()` and the implementation in subclasses (such as 
AggCallBinding) is modified.
   2. AggCallBinding is used for type inference when creating an AggregateCall. 
Therefore, the parameter `int groupCount` of the create method in AggregateCall 
is changed to `boolean hasEmptyGroup`, and the caller is adapted (RelBuilder, 
AggregateExpandDistinctAggregatesRule, AggregateJoinTransposeRule, etc.).
   3. Modify some test cases that are incorrect due to this issue, and add a 
new test case `testInferAggregateFunctionType`.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to