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

Documentation : collect_list documentation does not mention it silently ignores nulls

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • None
    • None
    • Documentation
    • None
    • select version()

      _c0▼
      2.1.0.2.6.5.1050-37 rb49a1217fdf463c41661ec6512348ff9ef4706a9

    Description

      Documentation at 

      https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-Built-inAggregateFunctions(UDAF)

      For collect_list is currently only 

      array collect_list(col) Returns a list of objects with duplicates. (As of Hive 0.13.0.)

      However it should mention that nulls are not captured, at least on Hive 2.1

      select collect_list(v) from (
      select 1 as v
      union all select null as v
      union all select 3 as v
      ) t

      Result

      _c0

      [1,3]

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            gxt Guillaume Xavier Taillon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: