xuzifu666 commented on code in PR #4903:
URL: https://github.com/apache/calcite/pull/4903#discussion_r3121450372
##########
core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java:
##########
@@ -10060,6 +10060,41 @@ private RelOptFixture spatial(String sql) {
sql(sql).withRule(CoreRules.AGGREGATE_REDUCE_FUNCTIONS,
CoreRules.PROJECT_MERGE).check();
}
+ /** Test case for
+ * <a
href="https://issues.apache.org/jira/browse/CALCITE-7484">[CALCITE-7484]
+ * Add AggregateFunctionOfGroupByKeysRule to eliminate redundant
+ * aggregates over GROUP BY keys</a>.
+ */
+ @Test void testAggregateFunctionOfGroupByKeys() {
+ final String sql = "select sal, max(sal) as sal_max, min(sal) as
sal_min,\n"
+ + "avg(sal) sal_avg, any_value(sal) as sal_val, first_value(sal) as
sal_first,\n"
Review Comment:
Thanks for pointing out this issue; I have already documented the relevant
jira https://issues.apache.org/jira/browse/CALCITE-7485.
--
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]