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

Julian Hyde resolved CALCITE-634.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 1.2.0-incubating

Fixed in 
http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/5e285a16.

> Allow ORDER BY aggregate function in SELECT DISTINCT, provided that it occurs 
> 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
>             Fix For: 1.2.0-incubating
>
>         Attachments: CALCITE-634.1.patch
>
>
> 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)

Reply via email to