Author: hashutosh
Date: Thu Apr  8 00:54:40 2010
New Revision: 931742

URL: http://svn.apache.org/viewvc?rev=931742&view=rev
Log:
PIG-1362 : Provide udf context signature in ensureAllKeysInSameSplit() method 
of loader

Modified:
    hadoop/pig/branches/branch-0.7/CHANGES.txt
    
hadoop/pig/branches/branch-0.7/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MRCompiler.java
    
hadoop/pig/branches/branch-0.7/test/org/apache/pig/test/TestCollectedGroup.java

Modified: hadoop/pig/branches/branch-0.7/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/branch-0.7/CHANGES.txt?rev=931742&r1=931741&r2=931742&view=diff
==============================================================================
--- hadoop/pig/branches/branch-0.7/CHANGES.txt (original)
+++ hadoop/pig/branches/branch-0.7/CHANGES.txt Thu Apr  8 00:54:40 2010
@@ -179,6 +179,9 @@ OPTIMIZATIONS
 
 BUG FIXES
 
+PIG-1362: Provide udf context signature in ensureAllKeysInSameSplit() method
+of loader (hashutosh)
+
 PIG-1352: piggybank UPPER udf throws exception if argument is null (thejas)
 
 PIG-1346: In unit tests Util.executeShellCommand relies on java commands being

Modified: 
hadoop/pig/branches/branch-0.7/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MRCompiler.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/branch-0.7/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MRCompiler.java?rev=931742&r1=931741&r2=931742&view=diff
==============================================================================
--- 
hadoop/pig/branches/branch-0.7/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MRCompiler.java
 (original)
+++ 
hadoop/pig/branches/branch-0.7/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MRCompiler.java
 Thu Apr  8 00:54:40 2010
@@ -930,6 +930,7 @@ public class MRCompiler extends PhyPlanV
                 if(!(loadFunc instanceof CollectableLoadFunc)){
                     throw new MRCompilerException("While using 'collected' on 
group; data must be loaded via loader implementing CollectableLoadFunc.");
                 }
+                loadFunc.setUDFContextSignature(loader.getSignature());
                 
((CollectableLoadFunc)loadFunc).ensureAllKeyInstancesInSameSplit();
             } catch (MRCompilerException e){
                 throw (e);

Modified: 
hadoop/pig/branches/branch-0.7/test/org/apache/pig/test/TestCollectedGroup.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/branch-0.7/test/org/apache/pig/test/TestCollectedGroup.java?rev=931742&r1=931741&r2=931742&view=diff
==============================================================================
--- 
hadoop/pig/branches/branch-0.7/test/org/apache/pig/test/TestCollectedGroup.java 
(original)
+++ 
hadoop/pig/branches/branch-0.7/test/org/apache/pig/test/TestCollectedGroup.java 
Thu Apr  8 00:54:40 2010
@@ -268,8 +268,16 @@ public class TestCollectedGroup extends 
 
     public static class DummyCollectableLoader extends PigStorage implements 
CollectableLoadFunc{
 
+        String udfContextSignature;
+        
+        @Override
+        public void setUDFContextSignature(String signature) {
+            udfContextSignature = signature;
+        }
+        
         @Override
         public void ensureAllKeyInstancesInSameSplit() throws IOException {
+            assertNotNull(udfContextSignature);
         }
         
     }


Reply via email to