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

Introduce Collect_Map UDAF

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      Similar to Collect_Set. For e.g. on a Txn table

      Txn(customer, product, amt)
      
      select customer, collect_map(product, amt)
      from txn
      group by customer
      

      Would give you an activity map for each customer.

      Other thoughts:

      • have explode do the inverse on maps just as it does for sets today.
      • introduce a table function that outputs each value as a column. So in the e.g. above you get an activity matrix instead of a map.

      Attachments

        1. Collect_map.patch
          8 kB
          Harish Butani

        Issue Links

          Activity

            People

              okumin Shohei Okumiya
              rhbutani Harish Butani
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: