danny0405 commented on a change in pull request #1715: [CALCITE-3662] Generate
wrong SQL when plan contains Project(Sort(Aggregate)) and aggregate field has
no alias
URL: https://github.com/apache/calcite/pull/1715#discussion_r363631710
##########
File path: core/src/test/java/org/apache/calcite/test/JdbcAdapterTest.java
##########
@@ -177,6 +177,38 @@
+ "ON \"t\".\"DEPTNO\" = \"t0\".\"DEPTNO\"");
}
+ @Test public void testGroupByWithLimitPlan() {
+ CalciteAssert.model(JdbcTest.SCOTT_MODEL)
+ .query("select sum(sal)\n"
+ + "from scott.emp \n"
+ + "group by ename limit 10")
+ .planHasSql("SELECT SUM(\"SAL\")\n"
Review comment:
You should add the tests in `RelToSqlConverterTest`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services