hannerwang opened a new pull request #2745:
URL: https://github.com/apache/calcite/pull/2745


   …T field and alias causes validation error
   
   This PR restricts the alias/ordinal expanding GROUP BY expr to identifier or 
CUBE/ROLLUP/GROUPING SETS top level expression.
   For example:
   select replace(name, 'a', 'b') as name from users group by replace(name, 
'a', 'b')
   The name in GROUP BY clause will not be replaced by replace(name, 'a', 'b'), 
it will be resolved as users.name.
   
   SELECT empno + deptno AS x, empno - deptno AS y FROM emp GROUP BY ROLLUP(x, 
y, empno) 
   The x, y in GROUP BY clause will be replaced by empno + deptno, empno - 
deptno.


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


Reply via email to