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

UDAF to convert an aggregation to a map

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 0.9.0, 0.10.0
    • Fix Version/s: None
    • Component/s: UDF
    • Labels:

      Description

      I propose the addition of two new Hive UDAF to help with maps in Apache Hive. The source code is available on GitHub at https://github.com/wdavidw/hive-udf in two Java classes: "UDAFToMap" and "UDAFToOrderedMap". The first function convert an aggregation into a map and is internally using a Java `HashMap`. The second function extends the first one. It convert an aggregation into an ordered map and is internally using a Java `TreeMap`. They both extends the `AbstractGenericUDAFResolver` class.

      Also, I have covered the motivations and usages of those UDAF in a blog post at http://adaltas.com/blog/2012/03/06/hive-udaf-map-conversion/

      The full patch is available with tests as well.

        Attachments

        1. hive-2843-dev.git.patch
          35 kB
          David Worms
        2. HIVE-2843.D8745.1.patch
          26 kB
          Phabricator
        3. HIVE-2843.1.patch.txt
          27 kB
          David Worms

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              d.worms David Worms
            • Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated: