Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-5658

count(distinct) produces confusing results for null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • None
    • None
    • None
    • None

    Description

      select csmallint, count(distinct(csmallint)) from alltypesorc group by csmallint limit 3;
      

      produces:

      NULL	0
      -16379	1
      -16373	1
      

      There are records in table with NULL values; however the count in this case should be 1, not 0, it seems. This is with TopN disabled, so it is unrelated to the other bug

      Attachments

        Activity

          People

            Unassigned Unassigned
            sershe Sergey Shelukhin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: