Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-2526

Add ability to parametize keys in maps with tuple fields or scalars

    XMLWordPrintableJSON

Details

    Description

      I want to access values in maps by tuple fields.

      A = load 'data' as (id:int, M:map[]);
      B = load 'other_data' as (id:int, cat:chararray);

      C = JOIN A by id, C by id;
      D = foreach A generate A:id, M#cat as hash_value; /* the value in cat for each record serves as the key in the map to retrieve its value. */

      Attachments

        Activity

          People

            Unassigned Unassigned
            russell.jurney Russell Jurney
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: