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

Allow UDF's to flatten themselves


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


      This is something I thought would be cool for a while, so I sat down and did it because I think there are some useful debugging tools it'd help with.

      The idea is that if you attach an annotation to a UDF, the Tuple or DataBag you output will be flattened. This is quite powerful. A very common pattern is:

      a = foreach data generate Flatten(MyUdf(thing)) as (a,b,c);

      This would let you just do:

      a = foreach data generate MyUdf(thing);

      With the exact same result!


        1. PIG-3010-0.patch
          79 kB
          Jonathan Coveney
        2. PIG-3010-1.patch
          71 kB
          Jonathan Coveney
        3. PIG-3010-2_nowhitespace.patch
          68 kB
          Jonathan Coveney
        4. PIG-3010-2.patch
          285 kB
          Jonathan Coveney
        5. PIG-3010-3_nows.patch
          69 kB
          Jonathan Coveney
        6. PIG-3010-3.patch
          261 kB
          Jonathan Coveney
        7. PIG-3010-4_nows.patch
          69 kB
          Jonathan Coveney
        8. PIG-3010-4.patch
          261 kB
          Jonathan Coveney
        9. PIG-3010-5_nows.patch
          69 kB
          Jonathan Coveney
        10. PIG-3010-5.patch
          261 kB
          Jonathan Coveney

          Issue Links



              • Assignee:
                jcoveney Jonathan Coveney
                jcoveney Jonathan Coveney
              • Votes:
                2 Vote for this issue
                6 Start watching this issue


                • Created: