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

Add a builtin udf which removes prefixes

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      This is something that I always hear people complaining about. Note that this depends on the FlattenOutput annotation.

      This UDF supports the following.

      a = load 'a' as (x1, y1, z1);
      b = load 'a' as (x2, y2, z2);
      c = join a by x1, b by x2;
      describe c;
      --c: {a::x1: bytearray,a::y1: bytearray,a::z1: bytearray,b::x2: bytearray,b::y2: bytearray,b::z2: bytearray}
      
      d = foreach c generate RemovePrefix(*);
      describe d;
      --d: {x1: bytearray,y1: bytearray,z1: bytearray,x2: bytearray,y2: bytearray,z2: bytearray}
      

      Attachments

        1. PIG-3088-0.patch
          289 kB
          Jonathan Coveney

        Issue Links

          Activity

            People

              jcoveney Jonathan Coveney
              jcoveney Jonathan Coveney
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: