rubenada commented on code in PR #5202:
URL: https://github.com/apache/calcite/pull/5202#discussion_r3841641510
##########
core/src/test/java/org/apache/calcite/test/enumerable/EnumerableSortedAggregateTest.java:
##########
@@ -50,6 +50,27 @@ public class EnumerableSortedAggregateTest {
"deptno=20; max_salary=8000.0; num_employee=1");
}
+ @Test void aggOnEmptyInput() {
+ tester(false, new HrSchema())
+ .query("select max(deptno) as m, count(*) as c "
+ + "from emps where deptno > 100")
+ .explainContains(
+ "EnumerableAggregate(group=[{}], m=[MAX($1)], c=[COUNT()])\n"
+ + " EnumerableCalc")
+ .returnsOrdered("m=null; c=0");
+ }
+
+ @Test void sortedAggRuleRejectsEmptyGroupSet() {
Review Comment:
Could you please add the usual javadoc convention to reference the ticket:
```
/** Test case for
* <a
href="https://issues.apache.org/jira/browse/CALCITE-6087">[CALCITE-6087]
* EnumerableSortedAggregate returns incorrect result when input is
empty</a>. */
```
--
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]