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 2019/03/08 04:26:08 UTC

[GitHub] [calcite] vineetgarg02 commented on issue #1087: [CALCITE-1172] Add rule to flatten two Aggregate operators into one

vineetgarg02 commented on issue #1087: [CALCITE-1172] Add rule to flatten two Aggregate operators into one
URL: https://github.com/apache/calcite/pull/1087#issuecomment-470800554
 
 
   @hsyuan  Following query on an empty table should produce NULL
   `select sum(y) from (
           select ename, count(mgr) y from 
           sales.emp group by ename, mgr) t`
   But with this rule I believe this will be rewritten to
   `select count(y) from t` which will produce 0.
   Can you add a test case for this and verify?
   
   Other similar query is:
   `select sum(y) from (
           select ename, mgr, count(mgr) y from 
           sales.emp group by ename, mgr) t 
           group by cube(ename, mgr);`
   
   This one should also output one row - NULL.
   
   
   

----------------------------------------------------------------
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