Hi, community CALCITE-4512 <https://issues.apache.org/jira/browse/CALCITE-4512> has revealed some GROUP BY alias expanding problems and I submitted a PR-2745 <https://github.com/apache/calcite/pull/2745> to solve the problem that only simple identifier and GROUPING SETS top level expressions should be expanded. CALCITE-5045 <https://issues.apache.org/jira/browse/CALCITE-5045> is an type mismatch problem for alias in GROUPING SETS, CALCITE-5043 <https://issues.apache.org/jira/browse/CALCITE-5043> is that different dialects behaves different on solving GROUP BY expression as alias or row type field, they both are better to be solved after CALCITE-4512 <https://issues.apache.org/jira/browse/CALCITE-4512> , so I request a review on PR-2745 <https://github.com/apache/calcite/pull/2745> to solve these problems and users will benefit from them as soon as possible.