Author: rohini
Date: Fri Apr  3 20:14:07 2015
New Revision: 1671152

URL: http://svn.apache.org/r1671152
Log:
PIG-4493: Pig on Tez gives wrong results if Union is followed by Split (rohini)

Modified:
    pig/trunk/CHANGES.txt
    
pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POFilter.java
    
pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POSplit.java
    pig/trunk/test/org/apache/pig/test/TestMultiQuery.java
    
pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-9-OPTOFF.gld
    pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-9.gld
    pig/trunk/test/org/apache/pig/tez/TestTezCompiler.java

Modified: pig/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1671152&r1=1671151&r2=1671152&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Fri Apr  3 20:14:07 2015
@@ -58,6 +58,8 @@ PIG-4333: Split BigData tests into multi
  
 BUG FIXES
 
+PIG-4493: Pig on Tez gives wrong results if Union is followed by Split (rohini)
+
 PIG-4491: Streaming Python Bytearray Bugs (jeremykarn via daijy)
 
 PIG-4487: Pig on Tez gives wrong success message on failure in case of 
multiple outputs (rohini)

Modified: 
pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POFilter.java
URL: 
http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POFilter.java?rev=1671152&r1=1671151&r2=1671152&view=diff
==============================================================================
--- 
pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POFilter.java
 (original)
+++ 
pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POFilter.java
 Fri Apr  3 20:14:07 2015
@@ -36,15 +36,15 @@ import org.apache.pig.impl.plan.VisitorE
  * avoid many function calls, the filter operator, stores the Comparison
  * Operator that is the root of the Expression Plan and uses its getNext
  * directly.
- * 
+ *
  * Since the filter is supposed to return tuples only, getNext is not supported
  * on any other data type.
- * 
+ *
  */
 public class POFilter extends PhysicalOperator {
 
     /**
-     * 
+     *
      */
     private static final long serialVersionUID = 1L;
 
@@ -54,7 +54,7 @@ public class POFilter extends PhysicalOp
     // The root comparison operator of the expression plan
 //    ComparisonOperator comOp;
     PhysicalOperator comOp;
-    
+
 
     // The operand type for the comparison operator needed
     // to call the comparison operators getNext with the
@@ -186,7 +186,7 @@ public class POFilter extends PhysicalOp
     public PhysicalPlan getPlan() {
         return plan;
     }
-    
+
     @Override
     public Tuple illustratorMarkup(Object in, Object out, int eqClassIndex) {
       if (illustrator != null) {
@@ -202,4 +202,13 @@ public class POFilter extends PhysicalOp
       }
       return (Tuple) out;
     }
+
+    @Override
+    public PhysicalOperator clone() throws CloneNotSupportedException {
+        Object o = super.clone();
+        POFilter opClone = (POFilter)o;
+        opClone.setPlan(plan.clone());
+        return opClone;
+    }
+
 }

Modified: 
pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POSplit.java
URL: 
http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POSplit.java?rev=1671152&r1=1671151&r2=1671152&view=diff
==============================================================================
--- 
pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POSplit.java
 (original)
+++ 
pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POSplit.java
 Fri Apr  3 20:14:07 2015
@@ -19,7 +19,6 @@ package org.apache.pig.backend.hadoop.ex
 
 import java.util.ArrayList;
 import java.util.BitSet;
-import java.util.LinkedList;
 import java.util.List;
 
 import org.apache.pig.backend.executionengine.ExecException;
@@ -32,9 +31,6 @@ import org.apache.pig.data.Tuple;
 import org.apache.pig.impl.io.FileSpec;
 import org.apache.pig.impl.plan.OperatorKey;
 import org.apache.pig.impl.plan.VisitorException;
-import org.apache.pig.impl.util.IdentityHashSet;
-import org.apache.pig.pen.util.ExampleTuple;
-import org.apache.pig.pen.util.LineageTracer;
 
 /**
  * The MapReduce Split operator.
@@ -49,7 +45,7 @@ import org.apache.pig.pen.util.LineageTr
  * as outputs of this operator using the conditions
  * specified in the LOSplit. So LOSplit will be converted
  * into:
- * 
+ *
  *     |        |           |
  *  Filter1  Filter2 ... Filter3
  *     |        |    ...    |
@@ -63,13 +59,13 @@ import org.apache.pig.pen.util.LineageTr
  * approach if not better in many cases because
  * of the availability of attachinInputs. An optimization
  * that can ensue is if there are multiple loads that
- * load the same file, they can be merged into one and 
- * then the operators that take input from the load 
+ * load the same file, they can be merged into one and
+ * then the operators that take input from the load
  * can be stored. This can be used when
  * the mapPlan executes to read the file only once and
- * attach the resulting tuple as inputs to all the 
+ * attach the resulting tuple as inputs to all the
  * operators that take input from this load.
- * 
+ *
  * In some cases where the conditions are exclusive and
  * some outputs are ignored, this approach can be worse.
  * But this leads to easier management of the Split and
@@ -79,24 +75,24 @@ import org.apache.pig.pen.util.LineageTr
 public class POSplit extends PhysicalOperator {
 
     private static final long serialVersionUID = 1L;
-    
+
     /*
      * The filespec that is used to store and load the output of the split job
      * which is the job containing the split
      */
     private FileSpec splitStore;
-       
+
     /*
      * The list of sub-plans the inner plan is composed of
      */
     private List<PhysicalPlan> myPlans = new ArrayList<PhysicalPlan>();
-    
+
     private BitSet processedSet = new BitSet();
-    
+
     private static Result empty = new Result(POStatus.STATUS_NULL, null);
-    
+
     private boolean inpEOP = false;
-    
+
     /**
      * Constructs an operator with the specified key
      * @param k the operator key
@@ -107,7 +103,7 @@ public class POSplit extends PhysicalOpe
 
     /**
      * Constructs an operator with the specified key
-     * and degree of parallelism 
+     * and degree of parallelism
      * @param k the operator key
      * @param rp the degree of parallelism requested
      */
@@ -116,7 +112,7 @@ public class POSplit extends PhysicalOpe
     }
 
     /**
-     * Constructs an operator with the specified key and inputs 
+     * Constructs an operator with the specified key and inputs
      * @param k the operator key
      * @param inp the inputs that this operator will read data from
      */
@@ -128,7 +124,7 @@ public class POSplit extends PhysicalOpe
      * Constructs an operator with the specified key,
      * degree of parallelism and inputs
      * @param k the operator key
-     * @param rp the degree of parallelism requested 
+     * @param rp the degree of parallelism requested
      * @param inp the inputs that this operator will read data from
      */
     public POSplit(OperatorKey k, int rp, List<PhysicalOperator> inp) {
@@ -172,20 +168,20 @@ public class POSplit extends PhysicalOpe
     }
 
     /**
-     * Returns the list of nested plans. 
+     * Returns the list of nested plans.
      * @return the list of the nested plans
      * @see 
org.apache.pig.backend.hadoop.executionengine.physicalLayer.plans.PlanPrinter
      */
     public List<PhysicalPlan> getPlans() {
         return myPlans;
     }
-    
+
     /**
-     * Appends the specified plan to the end of 
+     * Appends the specified plan to the end of
      * the nested input plan list
      * @param inPlan plan to be appended to the list
      */
-    public void addPlan(PhysicalPlan inPlan) {        
+    public void addPlan(PhysicalPlan inPlan) {
         myPlans.add(inPlan);
         processedSet.set(myPlans.size()-1);
     }
@@ -199,18 +195,18 @@ public class POSplit extends PhysicalOpe
         myPlans.remove(plan);
         processedSet.clear(myPlans.size());
     }
-   
+
     @Override
     public Result getNextTuple() throws ExecException {
 
         if (this.parentPlan.endOfAllInput) {
-            
-            return getStreamCloseResult();         
-        
-        } 
-        
+
+            return getStreamCloseResult();
+
+        }
+
         if (processedSet.cardinality() == myPlans.size()) {
-            
+
             Result inp = processInput();
 
             if (inp.returnStatus == POStatus.STATUS_EOP && 
this.parentPlan.endOfAllInput) {
@@ -221,44 +217,44 @@ public class POSplit extends PhysicalOpe
                 || inp.returnStatus == POStatus.STATUS_ERR ) {
                 return inp;
             }
-         
+
             Tuple tuple = (Tuple)inp.result;
             for (PhysicalPlan pl : myPlans) {
                 pl.attachInput(tuple);
             }
-            
+
             processedSet.clear();
         }
-        
-        return processPlan();                                       
+
+        return processPlan();
     }
 
     private Result processPlan() throws ExecException {
-   
+
         int idx = processedSet.nextClearBit(0);
         PhysicalOperator leaf = myPlans.get(idx).getLeaves().get(0);
-        
+
         Result res = runPipeline(leaf);
-        
+
         if (res.returnStatus == POStatus.STATUS_EOP) {
-            processedSet.set(idx++);        
+            processedSet.set(idx++);
             if (idx < myPlans.size()) {
                 res = processPlan();
             }
         }
-        
+
         return (res.returnStatus == POStatus.STATUS_OK) ? res : empty;
     }
-    
+
     private Result runPipeline(PhysicalOperator leaf) throws ExecException {
-       
+
         Result res = null;
-        
+
         while (true) {
-            
+
             res = leaf.getNextTuple();
-            
-            if (res.returnStatus == POStatus.STATUS_OK) {                
+
+            if (res.returnStatus == POStatus.STATUS_OK) {
                 break;
             } else if (res.returnStatus == POStatus.STATUS_NULL) {
                 continue;
@@ -267,19 +263,19 @@ public class POSplit extends PhysicalOpe
             } else if (res.returnStatus == POStatus.STATUS_ERR) {
                 break;
             }
-        }   
-        
+        }
+
         return res;
     }
-    
+
     private Result getStreamCloseResult() throws ExecException {
         Result res = null;
-        
+
         while (true) {
-            
+
             if (processedSet.cardinality() == myPlans.size()) {
                 Result inp = processInput();
-                if (inp.returnStatus == POStatus.STATUS_OK) {                
+                if (inp.returnStatus == POStatus.STATUS_OK) {
                     Tuple tuple = (Tuple)inp.result;
                     for (PhysicalPlan pl : myPlans) {
                         pl.attachInput(tuple);
@@ -293,40 +289,52 @@ public class POSplit extends PhysicalOpe
                     return inp;
                 }
                 processedSet.clear();
-            } 
-            
+            }
+
             int idx = processedSet.nextClearBit(0);
             if (inpEOP ) {
                 myPlans.get(idx).endOfAllInput = true;
             }
             PhysicalOperator leaf = myPlans.get(idx).getLeaves().get(0);
-            
+
             res = leaf.getNextTuple();
-           
+
             if (res.returnStatus == POStatus.STATUS_EOP)  {
-                processedSet.set(idx++);        
+                processedSet.set(idx++);
                 if (idx < myPlans.size()) {
                     continue;
                 }
             } else {
                 break;
             }
-            
-            if (!inpEOP && res.returnStatus == POStatus.STATUS_EOP) {          
         
+
+            if (!inpEOP && res.returnStatus == POStatus.STATUS_EOP) {
                 continue;
             } else {
                 break;
             }
         }
-        
+
         return res;
-                
+
     }
-    
+
+    @Override
+    public POSplit clone() throws CloneNotSupportedException {
+        Object o = super.clone();
+        POSplit opClone = (POSplit)o;
+        opClone.processedSet = new BitSet();
+        opClone.myPlans = new ArrayList<PhysicalPlan>(myPlans.size());
+        for (PhysicalPlan plan : myPlans) {
+            opClone.myPlans.add(plan.clone());
+        }
+        return opClone;
+    }
+
     @Override
     public Tuple illustratorMarkup(Object in, Object out, int eqClassIndex) {
-      // no op  
+      // no op
       return null;
     }
-        
+
 }

Modified: pig/trunk/test/org/apache/pig/test/TestMultiQuery.java
URL: 
http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestMultiQuery.java?rev=1671152&r1=1671151&r2=1671152&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestMultiQuery.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestMultiQuery.java Fri Apr  3 20:14:07 
2015
@@ -869,6 +869,44 @@ public class TestMultiQuery {
         Util.checkQueryOutputs(actualResults.iterator(), expectedResults);
     }
 
+    @Test
+    public void testMultiQueryJiraPig4493() throws Exception {
+
+        // Union followed by Split
+        Storage.Data data = Storage.resetData(myPig);
+        data.set("inputLocation",
+                Storage.tuple("1", "Dyson"),
+                Storage.tuple("2", "Miele"),
+                Storage.tuple("3", "Black & Decker")
+                );
+
+        myPig.setBatchOn();
+        myPig.registerQuery("A = load 'inputLocation' using mock.Storage();");
+        myPig.registerQuery("A = foreach A generate (int)$0 as a, 
(chararray)$1 as b;");
+        myPig.registerQuery("A1 = FILTER A by b matches '.*[a-zA-Z] *& 
*[a-zA-Z].*';");
+        myPig.registerQuery("A1 = FOREACH A1 generate a, REPLACE(b,'&','and')  
as b;");
+        myPig.registerQuery("A = UNION A1, A;");
+        myPig.registerQuery("A = FOREACH A generate a, LOWER(b) as b;");
+        myPig.registerQuery("A2 = GROUP A by a;");
+        myPig.registerQuery("A2 = FOREACH A2 generate group, COUNT(A) as 
cnt;");
+        myPig.registerQuery("store A2 into 'output1' using mock.Storage();");
+        myPig.registerQuery("A = FILTER A BY b is not null and b != '';");
+        myPig.registerQuery("store A into 'output2' using mock.Storage();");
+
+        myPig.executeBatch();
+
+        List<Tuple> actualResults = data.get("output1");
+        List<Tuple> expectedResults = Util.getTuplesFromConstantTupleStrings(
+                new String[] {"(1, 1L)", "(2, 1L)", "(3, 2L)"});
+        Util.checkQueryOutputsAfterSort(actualResults.iterator(), 
expectedResults);
+
+        actualResults = data.get("output2");
+        expectedResults = Util.getTuplesFromConstantTupleStrings(new String[] {
+                "(1, 'dyson')", "(2, 'miele')", "(3, 'black & decker')",
+                "(3, 'black and decker')" });
+        Util.checkQueryOutputsAfterSort(actualResults.iterator(), 
expectedResults);
+    }
+
     // 
--------------------------------------------------------------------------
     // Helper methods
 

Modified: 
pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-9-OPTOFF.gld
URL: 
http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-9-OPTOFF.gld?rev=1671152&r1=1671151&r2=1671152&view=diff
==============================================================================
--- 
pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-9-OPTOFF.gld 
(original)
+++ 
pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-9-OPTOFF.gld 
Fri Apr  3 20:14:07 2015
@@ -2,88 +2,88 @@
 # There are 1 DAGs in the session
 #--------------------------------------------------
 #--------------------------------------------------
-# TEZ DAG plan: pig-0_scope-1
+# TEZ DAG plan: pig-0_scope-0
 #--------------------------------------------------
-Tez vertex scope-108   ->      Tez vertex scope-109,
-Tez vertex scope-102   ->      Tez vertex scope-109,
-Tez vertex scope-109
+Tez vertex scope-46    ->      Tez vertex scope-47,
+Tez vertex scope-40    ->      Tez vertex scope-47,
+Tez vertex scope-47
 
-Tez vertex scope-108
+Tez vertex scope-46
 # Plan on vertex
-POValueOutputTez - scope-112   ->       [scope-109]
+POValueOutputTez - scope-50    ->       [scope-47]
 |
-|---c: New For Each(false,false)[bag] - scope-88
+|---c: New For Each(false,false)[bag] - scope-26
     |   |
-    |   Cast[int] - scope-83
+    |   Cast[int] - scope-21
     |   |
-    |   |---Project[bytearray][1] - scope-82
+    |   |---Project[bytearray][1] - scope-20
     |   |
-    |   Cast[chararray] - scope-86
+    |   Cast[chararray] - scope-24
     |   |
-    |   |---Project[bytearray][0] - scope-85
+    |   |---Project[bytearray][0] - scope-23
     |
-    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-81
-Tez vertex scope-102
+    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-19
+Tez vertex scope-40
 # Plan on vertex
-1-12: Split - scope-119
+1-2: Split - scope-57
 |   |
-|   a2: Store(file:///tmp/output/a2:org.apache.pig.builtin.PigStorage) - 
scope-76
+|   a2: Store(file:///tmp/output/a2:org.apache.pig.builtin.PigStorage) - 
scope-14
 |   |
-|   |---a2: Filter[bag] - scope-71
+|   |---a2: Filter[bag] - scope-9
 |       |   |
-|       |   Not[boolean] - scope-75
+|       |   Not[boolean] - scope-13
 |       |   |
-|       |   |---Greater Than[boolean] - scope-74
+|       |   |---Greater Than[boolean] - scope-12
 |       |       |
-|       |       |---Project[int][0] - scope-72
+|       |       |---Project[int][0] - scope-10
 |       |       |
-|       |       |---Constant(100) - scope-73
+|       |       |---Constant(100) - scope-11
 |   |
-|   POValueOutputTez - scope-111       ->       [scope-109]
+|   POValueOutputTez - scope-49        ->       [scope-47]
 |   |
-|   |---a1: Filter[bag] - scope-77
+|   |---a1: Filter[bag] - scope-15
 |       |   |
-|       |   Greater Than[boolean] - scope-80
+|       |   Greater Than[boolean] - scope-18
 |       |   |
-|       |   |---Project[int][0] - scope-78
+|       |   |---Project[int][0] - scope-16
 |       |   |
-|       |   |---Constant(100) - scope-79
+|       |   |---Constant(100) - scope-17
 |
-|---a: New For Each(false,false)[bag] - scope-69
+|---a: New For Each(false,false)[bag] - scope-7
     |   |
-    |   Cast[int] - scope-64
+    |   Cast[int] - scope-2
     |   |
-    |   |---Project[bytearray][0] - scope-63
+    |   |---Project[bytearray][0] - scope-1
     |   |
-    |   Cast[chararray] - scope-67
+    |   Cast[chararray] - scope-5
     |   |
-    |   |---Project[bytearray][1] - scope-66
+    |   |---Project[bytearray][1] - scope-4
     |
-    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-62
-Tez vertex scope-109
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-0
+Tez vertex scope-47
 # Plan on vertex
-1-13: Split - scope-118
+1-3: Split - scope-56
 |   |
-|   d: Store(file:///tmp/output/d:org.apache.pig.builtin.PigStorage) - scope-95
+|   d: Store(file:///tmp/output/d:org.apache.pig.builtin.PigStorage) - scope-33
 |   |
-|   |---d: Filter[bag] - scope-91
+|   |---d: Filter[bag] - scope-29
 |       |   |
-|       |   Greater Than[boolean] - scope-94
+|       |   Greater Than[boolean] - scope-32
 |       |   |
-|       |   |---Project[int][0] - scope-92
+|       |   |---Project[int][0] - scope-30
 |       |   |
-|       |   |---Constant(500) - scope-93
+|       |   |---Constant(500) - scope-31
 |   |
-|   e: Store(file:///tmp/output/e:org.apache.pig.builtin.PigStorage) - 
scope-101
+|   e: Store(file:///tmp/output/e:org.apache.pig.builtin.PigStorage) - scope-39
 |   |
-|   |---e: Filter[bag] - scope-96
+|   |---e: Filter[bag] - scope-34
 |       |   |
-|       |   Not[boolean] - scope-100
+|       |   Not[boolean] - scope-38
 |       |   |
-|       |   |---Greater Than[boolean] - scope-99
+|       |   |---Greater Than[boolean] - scope-37
 |       |       |
-|       |       |---Project[int][0] - scope-97
+|       |       |---Project[int][0] - scope-35
 |       |       |
-|       |       |---Constant(500) - scope-98
+|       |       |---Constant(500) - scope-36
 |
-|---POShuffledValueInputTez - scope-110        <-       [scope-102, scope-108]
+|---POShuffledValueInputTez - scope-48 <-       [scope-40, scope-46]

Modified: 
pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-9.gld
URL: 
http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-9.gld?rev=1671152&r1=1671151&r2=1671152&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-9.gld 
(original)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-9.gld 
Fri Apr  3 20:14:07 2015
@@ -27,27 +27,27 @@ Tez vertex scope-40
 |   |
 |   1-3: Split - scope-60
 |   |   |
-|   |   d: Store(file:///tmp/output/d:org.apache.pig.builtin.PigStorage) - 
scope-33
+|   |   d: Store(file:///tmp/output/d:org.apache.pig.builtin.PigStorage) - 
scope-65
 |   |   |
-|   |   |---d: Filter[bag] - scope-29
+|   |   |---d: Filter[bag] - scope-61
 |   |       |   |
-|   |       |   Greater Than[boolean] - scope-32
+|   |       |   Greater Than[boolean] - scope-64
 |   |       |   |
-|   |       |   |---Project[int][0] - scope-30
+|   |       |   |---Project[int][0] - scope-62
 |   |       |   |
-|   |       |   |---Constant(500) - scope-31
+|   |       |   |---Constant(500) - scope-63
 |   |   |
-|   |   e: Store(file:///tmp/output/e:org.apache.pig.builtin.PigStorage) - 
scope-39
+|   |   e: Store(file:///tmp/output/e:org.apache.pig.builtin.PigStorage) - 
scope-71
 |   |   |
-|   |   |---e: Filter[bag] - scope-34
+|   |   |---e: Filter[bag] - scope-66
 |   |       |   |
-|   |       |   Not[boolean] - scope-38
+|   |       |   Not[boolean] - scope-70
 |   |       |   |
-|   |       |   |---Greater Than[boolean] - scope-37
+|   |       |   |---Greater Than[boolean] - scope-69
 |   |       |       |
-|   |       |       |---Project[int][0] - scope-35
+|   |       |       |---Project[int][0] - scope-67
 |   |       |       |
-|   |       |       |---Constant(500) - scope-36
+|   |       |       |---Constant(500) - scope-68
 |   |
 |   |---a1: Filter[bag] - scope-15
 |       |   |
@@ -70,29 +70,29 @@ Tez vertex scope-40
     |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-0
 Tez vertex scope-46
 # Plan on vertex
-1-3: Split - scope-61
+1-3: Split - scope-72
 |   |
-|   d: Store(file:///tmp/output/d:org.apache.pig.builtin.PigStorage) - scope-33
+|   d: Store(file:///tmp/output/d:org.apache.pig.builtin.PigStorage) - scope-77
 |   |
-|   |---d: Filter[bag] - scope-29
+|   |---d: Filter[bag] - scope-73
 |       |   |
-|       |   Greater Than[boolean] - scope-32
+|       |   Greater Than[boolean] - scope-76
 |       |   |
-|       |   |---Project[int][0] - scope-30
+|       |   |---Project[int][0] - scope-74
 |       |   |
-|       |   |---Constant(500) - scope-31
+|       |   |---Constant(500) - scope-75
 |   |
-|   e: Store(file:///tmp/output/e:org.apache.pig.builtin.PigStorage) - scope-39
+|   e: Store(file:///tmp/output/e:org.apache.pig.builtin.PigStorage) - scope-83
 |   |
-|   |---e: Filter[bag] - scope-34
+|   |---e: Filter[bag] - scope-78
 |       |   |
-|       |   Not[boolean] - scope-38
+|       |   Not[boolean] - scope-82
 |       |   |
-|       |   |---Greater Than[boolean] - scope-37
+|       |   |---Greater Than[boolean] - scope-81
 |       |       |
-|       |       |---Project[int][0] - scope-35
+|       |       |---Project[int][0] - scope-79
 |       |       |
-|       |       |---Constant(500) - scope-36
+|       |       |---Constant(500) - scope-80
 |
 |---c: New For Each(false,false)[bag] - scope-26
     |   |

Modified: pig/trunk/test/org/apache/pig/tez/TestTezCompiler.java
URL: 
http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/tez/TestTezCompiler.java?rev=1671152&r1=1671151&r2=1671152&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/tez/TestTezCompiler.java (original)
+++ pig/trunk/test/org/apache/pig/tez/TestTezCompiler.java Fri Apr  3 20:14:07 
2015
@@ -508,6 +508,7 @@ public class TestTezCompiler {
 
         setProperty(PigConfiguration.PIG_TEZ_OPT_UNION, "" + true);
         run(query, 
"test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-9.gld");
+        resetScope();
         setProperty(PigConfiguration.PIG_TEZ_OPT_UNION, "" + false);
         run(query, 
"test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-9-OPTOFF.gld");
     }


Reply via email to