Author: olga
Date: Tue Aug 26 11:30:48 2008
New Revision: 689165

URL: http://svn.apache.org/viewvc?rev=689165&view=rev
Log:
PIG-373: unconnected load causes problems

Modified:
    incubator/pig/branches/types/CHANGES.txt
    
incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/optimizer/LogicalTransformer.java

Modified: incubator/pig/branches/types/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/incubator/pig/branches/types/CHANGES.txt?rev=689165&r1=689164&r2=689165&view=diff
==============================================================================
--- incubator/pig/branches/types/CHANGES.txt (original)
+++ incubator/pig/branches/types/CHANGES.txt Tue Aug 26 11:30:48 2008
@@ -175,3 +175,5 @@
     PIG-392: error handling with multiple MRjobs
 
     PIG-397: code defaults to single reducer
+
+    PIG-373: unconnected load causes problem,

Modified: 
incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/optimizer/LogicalTransformer.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/optimizer/LogicalTransformer.java?rev=689165&r1=689164&r2=689165&view=diff
==============================================================================
--- 
incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/optimizer/LogicalTransformer.java
 (original)
+++ 
incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/optimizer/LogicalTransformer.java
 Tue Aug 26 11:30:48 2008
@@ -200,6 +200,10 @@
             Map<Integer, Integer> projectionMapping)
             throws VisitorException, FrontendException {
         List<LogicalOperator> successors = mPlan.getSuccessors(after);
+        if(successors==null) {
+            mPlan.addAsLeaf(newNode);
+            return;
+        }
         if (successors.size() != 1) {
             throw new RuntimeException("insertAfter only valid to insert " + 
                 "after a node with single output.");


Reply via email to