Maksim Zhuravkov created IGNITE-25077:
-----------------------------------------
Summary: Sql. Introduced alias can not be referenced in GROUP BY
and GROUPING SET clauses
Key: IGNITE-25077
URL: https://issues.apache.org/jira/browse/IGNITE-25077
Project: Ignite
Issue Type: Bug
Components: sql
Reporter: Maksim Zhuravkov
Prior to Calcite 1.39 the following queries worked:
{noformat}
# aliases can be referenced in group by <columns> clause.
query II
SELECT 1 AS k, SUM(i) FROM integers GROUP BY k+1 ORDER BY 2
----
1 6
# aliases can be referenced in group by <grouping sets> clause.
query II
SELECT 1 AS k, SUM(i) FROM integers GROUP BY GROUPING SETS ((k+1)) ORDER BY 2
----
1 6
{noformat}
With calcite 1.39 they both result in an error:
{noformat}
Column 'K' not found in any table
{noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)