[ https://issues.apache.org/jira/browse/DRILL-6995?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Arina Ielchiieva closed DRILL-6995. ----------------------------------- Resolution: Won't Fix Calcite limitation. > 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 > > 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)