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

avg() ignores null values; consider variant that doesn't

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • Query Processor
    • None

    Description

      Some of the current aggregates (sum, avg) have a fairly standard behavior: If any item in the list is NULL, the sum, average, etc., cannot be computed. And so, NULL is returned.

      1) If this is the case, the query should return much faster--see a null, return NULL, exit(0).

      2) It would be nice to have versions or ways to use these functions with NULL data--specifically, to treat the NULL as zero or to ignore the NULL and return the results for non-NULL data.

      This also would apply to the variance functions referenced in https://issues.apache.org/jira/browse/HIVE-165

      Attachments

        Activity

          People

            Unassigned Unassigned
            akramer Adam Kramer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: