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

Deep cast of complex type

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.8.0
    • 0.9.0
    • impl
    • None
    • Reviewed
    • Enable deep cast of a tuple/bag to a tuple/bag of different inner schema

    Description

      Pig does not handle deep cast from bag -> bag, tuple -> tuple. Eg, the following script does not produce desired result:

      a = load '1.txt' as (a0:bag{t:tuple(i0:double)});
      b = foreach a generate (bag{tuple(int)})a0;
      dump b;
      

      The result tuple still contain int inside tuple of bag.

      PIG-613 fix the case we cast bytearray > bag/tuple, we take complex type including inner types, but bag>bag, tuple->tuple is still not effective.

      Attachments

        1. PIG-1758-2.patch
          18 kB
          Daniel Dai
        2. PIG-1758-1.patch
          18 kB
          Daniel Dai

        Issue Links

          Activity

            People

              daijy Daniel Dai
              daijy Daniel Dai
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: