[
https://issues.apache.org/jira/browse/CALCITE-1306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Julian Hyde updated CALCITE-1306:
---------------------------------
Description:
Allow GROUP BY and HAVING to reference SELECT expressions by ordinal and alias.
It is not standard SQL, but MySQL and PostgreSQL allow it.
See [Stack Overflow: SQL - using alias in Group
By|http://stackoverflow.com/questions/3841295/sql-using-alias-in-group-by].
It would be enabled only by new methods {{isGroupByOrdinal}} and
{{isGroupByAlias}} in SqlConformance.
We might allow alias in the HAVING clause (as described in HIVE-10557) but
ordinal does not make sense.
was:
Allow GROUP BY and HAVING to reference SELECT expressions by ordinal and alias.
It is not standard SQL, but MySQL and PostgreSQL allow it.
See
[http://stackoverflow.com/questions/3841295/sql-using-alias-in-group-by|Stack
Overflow: SQL - using alias in Group By] .
It would be enabled only by new methods {{isGroupByOrdinal}} and
{{isGroupByAlias}} in SqlConformance.
We might allow alias in the HAVING clause (as described in HIVE-10557) but
ordinal does not make sense.
> Allow GROUP BY and HAVING to reference SELECT expressions by ordinal and alias
> ------------------------------------------------------------------------------
>
> Key: CALCITE-1306
> URL: https://issues.apache.org/jira/browse/CALCITE-1306
> Project: Calcite
> Issue Type: Bug
> Reporter: Julian Hyde
> Assignee: Julian Hyde
>
> Allow GROUP BY and HAVING to reference SELECT expressions by ordinal and
> alias. It is not standard SQL, but MySQL and PostgreSQL allow it.
> See [Stack Overflow: SQL - using alias in Group
> By|http://stackoverflow.com/questions/3841295/sql-using-alias-in-group-by].
> It would be enabled only by new methods {{isGroupByOrdinal}} and
> {{isGroupByAlias}} in SqlConformance.
> We might allow alias in the HAVING clause (as described in HIVE-10557) but
> ordinal does not make sense.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)