1fanwang commented on code in PR #5202:
URL: https://github.com/apache/calcite/pull/5202#discussion_r3840633992
##########
core/src/test/java/org/apache/calcite/test/enumerable/EnumerableSortedAggregateTest.java:
##########
@@ -50,6 +50,21 @@ public class EnumerableSortedAggregateTest {
"deptno=20; max_salary=8000.0; num_employee=1");
}
+ @Test void sortedAggRuleOnEmptyInput() {
+ tester(false, new HrSchema())
+ .query("select max(deptno) as m, count(*) as c "
+ + "from emps where deptno > 100")
+ .withHook(Hook.PLANNER, (Consumer<RelOptPlanner>) planner -> {
+ planner.removeRule(EnumerableRules.ENUMERABLE_AGGREGATE_RULE);
+ planner.addRule(EnumerableRules.ENUMERABLE_SORTED_AGGREGATE_RULE);
+ planner.addRule(EnumerableRules.ENUMERABLE_AGGREGATE_RULE);
Review Comment:
makes sense! restructured tests in fefc55de
--
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]