You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by th...@apache.org on 2011/04/30 02:13:29 UTC

svn commit: r1098028 - in /pig/branches/branch-0.9: CHANGES.txt src/org/apache/pig/newplan/logical/visitor/LineageFindRelVisitor.java test/org/apache/pig/test/TestTypeCheckingValidatorNewLP.java

Author: thejas
Date: Sat Apr 30 00:13:29 2011
New Revision: 1098028

URL: http://svn.apache.org/viewvc?rev=1098028&view=rev
Log:
PIG-2018: NPE for co-group with group-by column having complex schema and
 different load functions for each input (thejas)

Modified:
    pig/branches/branch-0.9/CHANGES.txt
    pig/branches/branch-0.9/src/org/apache/pig/newplan/logical/visitor/LineageFindRelVisitor.java
    pig/branches/branch-0.9/test/org/apache/pig/test/TestTypeCheckingValidatorNewLP.java

Modified: pig/branches/branch-0.9/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.9/CHANGES.txt?rev=1098028&r1=1098027&r2=1098028&view=diff
==============================================================================
--- pig/branches/branch-0.9/CHANGES.txt (original)
+++ pig/branches/branch-0.9/CHANGES.txt Sat Apr 30 00:13:29 2011
@@ -174,6 +174,9 @@ PIG-1696: Performance: Use System.arrayc
 
 BUG FIXES
 
+PIG-2018: NPE for co-group with group-by column having complex schema and
+ different load functions for each input (thejas)
+
 PIG-2015: Explain writes out logical plan twice (alangates)
 
 PIG-2017: consumeMap() fails with EmptyStackException (thedatachef via daijy)

Modified: pig/branches/branch-0.9/src/org/apache/pig/newplan/logical/visitor/LineageFindRelVisitor.java
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.9/src/org/apache/pig/newplan/logical/visitor/LineageFindRelVisitor.java?rev=1098028&r1=1098027&r2=1098028&view=diff
==============================================================================
--- pig/branches/branch-0.9/src/org/apache/pig/newplan/logical/visitor/LineageFindRelVisitor.java (original)
+++ pig/branches/branch-0.9/src/org/apache/pig/newplan/logical/visitor/LineageFindRelVisitor.java Sat Apr 30 00:13:29 2011
@@ -507,7 +507,6 @@ public class LineageFindRelVisitor exten
                 //check if all func spec match
                 if(!funcSpec1.equals(uid2LoadFuncMap.get(fs.uid))){
                     allMatch = false;
-                    break;
                 }
                 //check if all inner schema match for use later
                 if(outFS.schema == null ||  !outFS.schema.isEqual(fs.schema)){

Modified: pig/branches/branch-0.9/test/org/apache/pig/test/TestTypeCheckingValidatorNewLP.java
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.9/test/org/apache/pig/test/TestTypeCheckingValidatorNewLP.java?rev=1098028&r1=1098027&r2=1098028&view=diff
==============================================================================
--- pig/branches/branch-0.9/test/org/apache/pig/test/TestTypeCheckingValidatorNewLP.java (original)
+++ pig/branches/branch-0.9/test/org/apache/pig/test/TestTypeCheckingValidatorNewLP.java Sat Apr 30 00:13:29 2011
@@ -4106,4 +4106,17 @@ public class TestTypeCheckingValidatorNe
             checkLastForeachCastLoadFunc(query, null, 0);
         }
 
+        //see PIG-2018
+        @Test
+        public void testCoGroupComplex(){
+            String query = 
+                "l1 = load 'x' using PigStorage(':') as (a : (i : int),b,c);"
+                + "l2 = load 'x' as (a,b,c);"
+                + "cg = cogroup l1 by a, l2 by a;";
+            try {
+                createAndProcessLPlan(query);
+            } catch (FrontendException e) {
+                fail("caught exception creating lp");
+            }
+        }
 }