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

macros don't accept references to items within tuples as arguments

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.9.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      I'd like to be able to pass a reference to an item within a parameter to a Pig Macro.

      For example, suppose that I had a relation A with the schema A:

      {id:long, header:(time:long, type:chararray)}

      . I'd like to call a macro by typing:

      B = MY_MACRO(A, header.time);

      but this does not currently work. Obviously, I could define a new relation as a workaround, for example I could use some pig code like

      AA = FOREACH a GENERATE *, header.time as time;
      B = MY_MACRO(AA, time);

      But that's ugly and clunky

        Attachments

        1. PIG-2378.patch.txt
          2 kB
          Johnny Zhang
        2. PIG-2378.patch.txt
          2 kB
          Johnny Zhang

          Activity

            People

            • Assignee:
              dreambird Johnny Zhang
              Reporter:
              jadler Joseph Adler
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: