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

Tuple field mangled during flattening

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 0.9.2, 0.10.0
    • 0.11, 0.10.1
    • None
    • None
    • RHEL5 (Linux 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:54 EDT 2009 i686 i686 i386 GNU/Linux)

    • Reviewed

    Description

      1.txt:
      1, 2, 3
      4, 5, 6
      7, 8, 9

      a = load '1.txt' using PigStorage(',') as (x:int, y:int, z:int);
      b = foreach a generate TOTUPLE(x, y) as t, z;
      c = group b by t;
      d = foreach c generate flatten(b);
      e = foreach d generate t;

      Describing d shows the schema as d:

      {b::t: (x: int,y: int),b::z: int}

      However, when dumping d the output is
      (1,3)
      (4,6)
      (7,9)

      Describing e shows the schema as e:

      {b::t: (x: int,y: int)}

      However, when dumping I got the following error:
      java.lang.ClassCastException: java.lang.Integer cannot be cast to org.apache.pig.data.Tuple

      Attachments

        1. PIG-2717-2.patch
          5 kB
          Daniel Dai
        2. PIG-2717-1.patch
          5 kB
          Daniel Dai

        Activity

          People

            daijy Daniel Dai
            smalltalk80 Brian Tan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: