Pig
  1. Pig
  2. PIG-1064

Behvaiour of COGROUP with and without schema when using "*" operator

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.6.0
    • Fix Version/s: 0.6.0
    • Component/s: impl
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      I have 2 tab separated files, "1.txt" and "2.txt"

      $ cat 1.txt
      ====================
      1 2

      2 3

      ====================
      $ cat 2.txt

      1 2

      2 3

      I use COGROUP feature of Pig in the following way:

      $java -cp pig.jar:$HADOOP_HOME org.apache.pig.Main

      grunt> A = load '1.txt';            
      grunt> B = load '2.txt' as (b0, b1);
      grunt> C = cogroup A by *, B by *;  
      

      2009-10-29 12:46:04,150 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1012: Each COGroup input has to have the same number of inner plans
      Details at logfile: pig_1256845224752.log
      ==========================================================

      If I reverse, the order of the schema's

      grunt> A = load '1.txt' as (a0, a1);
      grunt> B = load '2.txt';            
      grunt> C = cogroup A by *, B by *;  
      

      2009-10-29 12:49:27,869 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1013: Grouping attributes can either be star or a list of expressions, but not both.
      Details at logfile: pig_1256845224752.log

      ==========================================================
      Now running without schema??

      grunt> A = load '1.txt';            
      grunt> B = load '2.txt';            
      grunt> C = cogroup A by *, B by *;
      grunt> dump C; 
      

      2009-10-29 12:55:37,202 [main] INFO org.apache.pig.backend.local.executionengine.LocalPigLauncher - Successfully stored result in: "file:/tmp/temp-319926700/tmp-1990275961"
      2009-10-29 12:55:37,202 [main] INFO org.apache.pig.backend.local.executionengine.LocalPigLauncher - Records written : 2
      2009-10-29 12:55:37,202 [main] INFO org.apache.pig.backend.local.executionengine.LocalPigLauncher - Bytes written : 154
      2009-10-29 12:55:37,202 [main] INFO org.apache.pig.backend.local.executionengine.LocalPigLauncher - 100% complete!
      2009-10-29 12:55:37,202 [main] INFO org.apache.pig.backend.local.executionengine.LocalPigLauncher - Success!!

      ((1,2),

      {(1,2)},{(1,2)}

      )
      ((2,3),

      {(2,3)},{(2,3)}

      )
      ==========================================================

      Is this a bug or a feature?

      Viraj

      1. PIG-1064.patch
        9 kB
        Pradeep Kamath
      2. PIG-1064-2.patch
        20 kB
        Pradeep Kamath
      3. PIG-1064-3.patch
        21 kB
        Pradeep Kamath
      4. PIG-1064-4.patch
        21 kB
        Daniel Dai
      5. PIG-1064-5.patch
        14 kB
        Pradeep Kamath

        Activity

        Alan Gates made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Pradeep Kamath made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags [Reviewed]
        Resolution Fixed [ 1 ]
        Pradeep Kamath made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Pradeep Kamath made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Pradeep Kamath made changes -
        Attachment PIG-1064-5.patch [ 12425360 ]
        Daniel Dai made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Daniel Dai made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Daniel Dai made changes -
        Attachment PIG-1064-4.patch [ 12424878 ]
        Pradeep Kamath made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Pradeep Kamath made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Pradeep Kamath made changes -
        Attachment PIG-1064-3.patch [ 12424792 ]
        Pradeep Kamath made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Pradeep Kamath made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Pradeep Kamath made changes -
        Attachment PIG-1064-2.patch [ 12424755 ]
        Pradeep Kamath made changes -
        Attachment PIG-1064.patch [ 12424676 ]
        Pradeep Kamath made changes -
        Field Original Value New Value
        Status Open [ 1 ] Patch Available [ 10002 ]
        Assignee Pradeep Kamath [ pkamath ]
        Viraj Bhat created issue -

          People

          • Assignee:
            Pradeep Kamath
            Reporter:
            Viraj Bhat
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development