1fanwang commented on code in PR #5225:
URL: https://github.com/apache/calcite/pull/5225#discussion_r4096480107
##########
core/src/test/java/org/apache/calcite/test/JdbcTest.java:
##########
@@ -3391,6 +3391,14 @@ void testJoinWithTrimmingConfigs(boolean
enableTrimmingByConfig,
+ "store_id=0; grocery_sqft=null\n");
}
+ @Test void testOrderByAggregateAliasShadowing() {
+ CalciteAssert.that()
+ .with(CalciteAssert.Config.SCOTT)
+ .query("SELECT max(sal) AS sal, deptno, job "
+ + "FROM emp GROUP BY deptno, job ORDER BY max(sal)")
+ .throws_("Aggregate expressions cannot be nested");
Review Comment:
Not precisely: the error spans columns 12 to 83, while the aggregate itself
is at columns 76 to 83.
--
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]