[
https://issues.apache.org/jira/browse/CALCITE-634?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sean Hsuan-Yi Chu updated CALCITE-634:
--------------------------------------
Description:
For example, the query
{code:sql}
select distinct deptno from emp group by 1
{code}
gave:
org.apache.calcite.runtime.CalciteContextException: From line 1, column 17 to
line 1, column 22: Expression 'DEPTNO' is not being grouped
org.apache.calcite.sql.validate.SqlValidatorException: Expression 'DEPTNO' is
not being grouped
was:
For example, the query
{code:sql}
select distinct deptno as a from emp group by 1
{code}
gave:
org.apache.calcite.runtime.CalciteContextException: From line 1, column 17 to
line 1, column 22: Expression 'DEPTNO' is not being grouped
org.apache.calcite.sql.validate.SqlValidatorException: Expression 'DEPTNO' is
not being grouped
> Failure to order by if DISTINCT clause is present
> -------------------------------------------------
>
> Key: CALCITE-634
> URL: https://issues.apache.org/jira/browse/CALCITE-634
> Project: Calcite
> Issue Type: Bug
> Reporter: Sean Hsuan-Yi Chu
> Assignee: Julian Hyde
>
> For example, the query
> {code:sql}
> select distinct deptno from emp group by 1
> {code}
> gave:
> org.apache.calcite.runtime.CalciteContextException: From line 1, column 17 to
> line 1, column 22: Expression 'DEPTNO' is not being grouped
> org.apache.calcite.sql.validate.SqlValidatorException: Expression 'DEPTNO' is
> not being grouped
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)