You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Sean Hsuan-Yi Chu (JIRA)" <ji...@apache.org> on 2015/03/20 19:51:38 UTC

[jira] [Updated] (CALCITE-634) Failure to order by an aggregate function, which exists in select-clause if distinct is present in select-clause

     [ https://issues.apache.org/jira/browse/CALCITE-634?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Hsuan-Yi Chu updated CALCITE-634:
--------------------------------------
    Summary: Failure to order by an aggregate function, which exists in select-clause if distinct is present in select-clause  (was: Failure to order by if DISTINCT clause is present)

> Failure to order by an aggregate function, which exists in select-clause if distinct is present in select-clause
> ----------------------------------------------------------------------------------------------------------------
>
>                 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 count(empno) from emp
> group by empno
> order by 1
> {code}
> gave:
> org.apache.calcite.sql.validate.SqlValidatorException <init>
> SEVERE: org.apache.calcite.sql.validate.SqlValidatorException: Expression 'COUNT(`EMP`.`EMPNO`)' is not in the select clause



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)