[
https://issues.apache.org/jira/browse/DRILL-6995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16749913#comment-16749913
]
Arina Ielchiieva commented on DRILL-6995:
-----------------------------------------
Actually issue is in the Calcite -
https://issues.apache.org/jira/browse/CALCITE-2799.
> Count() function is not working with columns alias
> --------------------------------------------------
>
> Key: DRILL-6995
> URL: https://issues.apache.org/jira/browse/DRILL-6995
> Project: Apache Drill
> Issue Type: Bug
> Affects Versions: 1.15.0
> Reporter: Denys Ordynskiy
> Priority: Major
> Fix For: 1.17.0
>
>
> The query works correctly if I use column name in the count() function:
> {code:java}
> select department_id c from cp.`employee.json` group by c having
> count(department_id) > 1
> {code}
> |c|
> |1|
> |2|
> |3|
> |11|
> |5|
> |4|
> |19|
> |14|
> |15|
> |16|
> But when I set column alias "c" in the count() function, Drill returns *an
> empty result set*:
> {code:java}
> select department_id c from cp.`employee.json` group by c having count(c) > 1
> {code}
> |c|
> | |
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)