You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2020/01/08 03:01:37 UTC

[GitHub] [calcite] yanlin-Lynn commented on issue #1715: [CALCITE-3662] Generate wrong SQL when plan contains Project(Sort(Aggregate)) and aggregate field has no alias

yanlin-Lynn commented on issue #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#issuecomment-571870272
 
 
   I add a test case in RelToSqlConverterTest, it seems to produce a correct sql
   ```
   @Test public void testGroupByWithLimitPlan() {
       String query = "SELECT sum(\"salary\") FROM \"employee\" group by \"gender\" limit 10";
       sql(query)
           .ok("SELECT SUM(\"salary\")\n"
               + "FROM \"foodmart\".\"employee\"\n"
               + "GROUP BY \"gender\"\n"
               + "FETCH NEXT 10 ROWS ONLY");
     }
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services