Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-6995

Count() function is not working with columns alias

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.15.0
    • None
    • None
    • None

    Description

      The query works correctly if I use column name in the count() function:

      select department_id c from cp.`employee.json` group by c having count(department_id) > 1
      
      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:

      select department_id c from cp.`employee.json` group by c having count(c) > 1
      
      c
       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              denysord88 Denys Ordynskiy
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: