You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by da...@apache.org on 2014/05/30 21:07:29 UTC

svn commit: r1598702 [22/23] - in /pig/trunk: ./ ivy/ shims/src/hadoop23/org/apache/pig/backend/hadoop23/ shims/test/hadoop20/org/apache/pig/test/ shims/test/hadoop23/org/apache/pig/test/ src/META-INF/services/ src/org/apache/pig/ src/org/apache/pig/ba...

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/TEZC3.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/TEZC3.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/TEZC3.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/TEZC3.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,63 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-38
+#--------------------------------------------------
+Tez vertex scope-35	->	Tez vertex scope-37,
+Tez vertex scope-36	->	Tez vertex scope-37,
+Tez vertex scope-37
+
+Tez vertex scope-35
+# Plan on vertex
+c: Local Rearrange[tuple]{int}(false) - scope-20	->	 scope-37
+|   |
+|   Project[int][0] - scope-21
+|
+|---a: New For Each(false,false)[bag] - scope-7
+    |   |
+    |   Cast[int] - scope-2
+    |   |
+    |   |---Project[bytearray][0] - scope-1
+    |   |
+    |   Cast[int] - scope-5
+    |   |
+    |   |---Project[bytearray][1] - scope-4
+    |
+    |---a: Load(file:///tmp/input1:org.apache.pig.builtin.PigStorage) - scope-0
+Tez vertex scope-36
+# Plan on vertex
+c: Local Rearrange[tuple]{int}(false) - scope-22	->	 scope-37
+|   |
+|   Project[int][0] - scope-23
+|
+|---b: New For Each(false,false)[bag] - scope-15
+    |   |
+    |   Cast[int] - scope-10
+    |   |
+    |   |---Project[bytearray][0] - scope-9
+    |   |
+    |   Cast[int] - scope-13
+    |   |
+    |   |---Project[bytearray][1] - scope-12
+    |
+    |---b: Load(file:///tmp/input2:org.apache.pig.builtin.PigStorage) - scope-8
+Tez vertex scope-37
+# Plan on vertex
+d: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-34
+|
+|---d: New For Each(false,false,false)[bag] - scope-33
+    |   |
+    |   Project[int][0] - scope-27
+    |   |
+    |   Project[int][1] - scope-29
+    |   |
+    |   Project[int][3] - scope-31
+    |
+    |---c: New For Each(true,true)[tuple] - scope-26
+        |   |
+        |   Project[bag][1] - scope-24
+        |   |
+        |   Project[bag][2] - scope-25
+        |
+        |---c: Package(Packager)[tuple]{int} - scope-19

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/TEZC4.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/TEZC4.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/TEZC4.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/TEZC4.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,39 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-18
+#--------------------------------------------------
+Tez vertex scope-10	->	Tez vertex scope-13,
+Tez vertex scope-13
+
+Tez vertex scope-10
+# Plan on vertex
+b: Local Rearrange[tuple]{tuple}(false) - scope-12	->	 scope-13
+|   |
+|   Project[tuple][*] - scope-11
+|
+|---b: Limit - scope-1
+    |
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-0
+Tez vertex scope-13
+# Plan on vertex
+c: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-9
+|
+|---c: New For Each(false)[bag] - scope-8
+    |   |
+    |   Project[int][0] - scope-6
+    |
+    |---a: New For Each(false)[bag] - scope-5
+        |   |
+        |   Cast[int] - scope-3
+        |   |
+        |   |---Project[bytearray][0] - scope-2
+        |
+        |---b: Limit - scope-17
+            |
+            |---b: New For Each(true)[bag] - scope-16
+                |   |
+                |   Project[tuple][1] - scope-15
+                |
+                |---b: Package(Packager)[tuple]{tuple} - scope-14

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/TEZC5.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/TEZC5.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/TEZC5.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/TEZC5.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,49 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-25
+#--------------------------------------------------
+Tez vertex scope-13	->	Tez vertex scope-16,
+Tez vertex scope-16
+
+Tez vertex scope-13
+# Plan on vertex
+b: Local Rearrange[tuple]{tuple}(true) - scope-15	->	 scope-16
+|   |
+|   Project[tuple][*] - scope-14
+|
+|---a: New For Each(false,false)[bag] - scope-7
+    |   |
+    |   Cast[int] - scope-2
+    |   |
+    |   |---Project[bytearray][0] - scope-1
+    |   |
+    |   Cast[int] - scope-5
+    |   |
+    |   |---Project[bytearray][1] - scope-4
+    |
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-0
+Tez vertex scope-16
+# Combine plan on edge <scope-13>
+Local Rearrange[tuple]{tuple}(true) - scope-21	->	 scope-16
+|   |
+|   Project[tuple][*] - scope-20
+|
+|---New For Each(true)[bag] - scope-19
+    |   |
+    |   Project[tuple][0] - scope-18
+    |
+    |---Package(Packager)[tuple]{tuple} - scope-17
+# Plan on vertex
+c: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-12
+|
+|---c: New For Each(false)[bag] - scope-11
+    |   |
+    |   Project[int][1] - scope-9
+    |
+    |---New For Each(true)[bag] - scope-24
+        |   |
+        |   Project[tuple][0] - scope-23
+        |
+        |---Package(Packager)[tuple]{tuple} - scope-22

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-1-OPTOFF.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-1-OPTOFF.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-1-OPTOFF.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-1-OPTOFF.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,65 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-66
+#--------------------------------------------------
+Tez vertex scope-58	->	Tez vertex scope-60,Tez vertex scope-62,Tez vertex scope-64,
+Tez vertex scope-64
+Tez vertex scope-62
+Tez vertex scope-60
+
+Tez vertex scope-58
+# Plan on vertex
+POValueOutputTez - scope-59	->	 [scope-64, scope-62, scope-60]
+|
+|---a: New For Each(false,false)[bag] - scope-41
+    |   |
+    |   Cast[int] - scope-36
+    |   |
+    |   |---Project[bytearray][0] - scope-35
+    |   |
+    |   Cast[int] - scope-39
+    |   |
+    |   |---Project[bytearray][1] - scope-38
+    |
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-34
+Tez vertex scope-64
+# Plan on vertex
+d: Store(file:///tmp/output/d:org.apache.pig.builtin.PigStorage) - scope-57
+|
+|---d: Filter[bag] - scope-53
+    |   |
+    |   Greater Than[boolean] - scope-56
+    |   |
+    |   |---Project[int][0] - scope-54
+    |   |
+    |   |---Constant(10) - scope-55
+    |
+    |---POValueInputTez - scope-65	<-	 scope-58
+Tez vertex scope-62
+# Plan on vertex
+c: Store(file:///tmp/output/c:org.apache.pig.builtin.PigStorage) - scope-52
+|
+|---c: Filter[bag] - scope-48
+    |   |
+    |   Less Than or Equal[boolean] - scope-51
+    |   |
+    |   |---Project[int][0] - scope-49
+    |   |
+    |   |---Constant(10) - scope-50
+    |
+    |---POValueInputTez - scope-63	<-	 scope-58
+Tez vertex scope-60
+# Plan on vertex
+b: Store(file:///tmp/output/b:org.apache.pig.builtin.PigStorage) - scope-47
+|
+|---b: Filter[bag] - scope-43
+    |   |
+    |   Less Than or Equal[boolean] - scope-46
+    |   |
+    |   |---Project[int][0] - scope-44
+    |   |
+    |   |---Constant(5) - scope-45
+    |
+    |---POValueInputTez - scope-61	<-	 scope-58

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-1.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-1.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-1.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-1.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,53 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-33
+#--------------------------------------------------
+Tez vertex scope-24
+
+Tez vertex scope-24
+# Plan on vertex
+1-1: Split - scope-32
+|   |
+|   b: Store(file:///tmp/output/b:org.apache.pig.builtin.PigStorage) - scope-13
+|   |
+|   |---b: Filter[bag] - scope-9
+|       |   |
+|       |   Less Than or Equal[boolean] - scope-12
+|       |   |
+|       |   |---Project[int][0] - scope-10
+|       |   |
+|       |   |---Constant(5) - scope-11
+|   |
+|   c: Store(file:///tmp/output/c:org.apache.pig.builtin.PigStorage) - scope-18
+|   |
+|   |---c: Filter[bag] - scope-14
+|       |   |
+|       |   Less Than or Equal[boolean] - scope-17
+|       |   |
+|       |   |---Project[int][0] - scope-15
+|       |   |
+|       |   |---Constant(10) - scope-16
+|   |
+|   d: Store(file:///tmp/output/d:org.apache.pig.builtin.PigStorage) - scope-23
+|   |
+|   |---d: Filter[bag] - scope-19
+|       |   |
+|       |   Greater Than[boolean] - scope-22
+|       |   |
+|       |   |---Project[int][0] - scope-20
+|       |   |
+|       |   |---Constant(10) - scope-21
+|
+|---a: New For Each(false,false)[bag] - scope-7
+    |   |
+    |   Cast[int] - scope-2
+    |   |
+    |   |---Project[bytearray][0] - scope-1
+    |   |
+    |   Cast[int] - scope-5
+    |   |
+    |   |---Project[bytearray][1] - scope-4
+    |
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-0

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-2-OPTOFF.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-2-OPTOFF.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-2-OPTOFF.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-2-OPTOFF.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,308 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-418
+#--------------------------------------------------
+Tez vertex scope-319	->	Tez vertex scope-321,Tez vertex scope-332,Tez vertex scope-343,
+Tez vertex scope-332	->	Tez vertex scope-335,Tez vertex scope-340,
+Tez vertex scope-335	->	Tez vertex scope-339,
+Tez vertex scope-321	->	Tez vertex scope-324,Tez vertex scope-337,Tez vertex scope-348,
+Tez vertex scope-337	->	Tez vertex scope-339,
+Tez vertex scope-339
+Tez vertex scope-348	->	Tez vertex scope-351,Tez vertex scope-375,
+Tez vertex scope-375	->	Tez vertex scope-379,
+Tez vertex scope-379	->	Tez vertex scope-385,Tez vertex scope-389,
+Tez vertex scope-385
+Tez vertex scope-343	->	Tez vertex scope-346,Tez vertex scope-387,
+Tez vertex scope-387	->	Tez vertex scope-415,
+Tez vertex scope-389	->	Tez vertex scope-415,
+Tez vertex scope-415
+Tez vertex scope-346
+Tez vertex scope-340	->	Tez vertex scope-342,
+Tez vertex scope-342
+Tez vertex scope-324	->	Tez vertex scope-326,
+Tez vertex scope-326	->	Tez vertex scope-328,Tez vertex scope-330,
+Tez vertex scope-328
+Tez vertex scope-351	->	Tez vertex scope-369,Tez vertex scope-359,
+Tez vertex scope-359	->	Tez vertex scope-369,
+Tez vertex scope-369	->	Tez vertex scope-371,
+Tez vertex scope-371
+Tez vertex scope-330
+
+Tez vertex scope-319
+# Plan on vertex
+POValueOutputTez - scope-320	->	 [scope-321, scope-332, scope-343]
+|
+|---a: New For Each(false,false)[bag] - scope-220
+    |   |
+    |   Cast[int] - scope-215
+    |   |
+    |   |---Project[bytearray][0] - scope-214
+    |   |
+    |   Cast[int] - scope-218
+    |   |
+    |   |---Project[bytearray][1] - scope-217
+    |
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-213
+Tez vertex scope-332
+# Plan on vertex
+POValueOutputTez - scope-334	->	 [scope-340, scope-335]
+|
+|---c: Filter[bag] - scope-247
+    |   |
+    |   Less Than or Equal[boolean] - scope-250
+    |   |
+    |   |---Project[int][0] - scope-248
+    |   |
+    |   |---Constant(10) - scope-249
+    |
+    |---POValueInputTez - scope-333	<-	 scope-319
+Tez vertex scope-335
+# Plan on vertex
+c1: Local Rearrange[tuple]{int}(false) - scope-260	->	 scope-339
+|   |
+|   Project[int][0] - scope-261
+|
+|---POValueInputTez - scope-336	<-	 scope-332
+Tez vertex scope-321
+# Plan on vertex
+POValueOutputTez - scope-323	->	 [scope-348, scope-337, scope-324]
+|
+|---b: Filter[bag] - scope-222
+    |   |
+    |   Less Than or Equal[boolean] - scope-225
+    |   |
+    |   |---Project[int][0] - scope-223
+    |   |
+    |   |---Constant(5) - scope-224
+    |
+    |---POValueInputTez - scope-322	<-	 scope-319
+Tez vertex scope-337
+# Plan on vertex
+c1: Local Rearrange[tuple]{int}(false) - scope-262	->	 scope-339
+|   |
+|   Project[int][0] - scope-263
+|
+|---POValueInputTez - scope-338	<-	 scope-321
+Tez vertex scope-339
+# Plan on vertex
+c1: Store(file:///tmp/output/c1:org.apache.pig.builtin.PigStorage) - scope-267
+|
+|---c1: New For Each(true,true)[tuple] - scope-266
+    |   |
+    |   Project[bag][1] - scope-264
+    |   |
+    |   Project[bag][2] - scope-265
+    |
+    |---c1: Package(Packager)[tuple]{int} - scope-259
+Tez vertex scope-348
+# Plan on vertex
+POValueOutputTez - scope-350	->	 [scope-375, scope-351]
+|
+|---POValueInputTez - scope-349	<-	 scope-321
+Tez vertex scope-375
+# Plan on vertex
+f1: Local Rearrange[tuple]{tuple}(false) - scope-378	->	 scope-379
+|   |
+|   Project[tuple][*] - scope-377
+|
+|---f1: Limit - scope-308
+    |
+    |---f: Filter[bag] - scope-304
+        |   |
+        |   Greater Than or Equal[boolean] - scope-307
+        |   |
+        |   |---Project[int][0] - scope-305
+        |   |
+        |   |---Constant(3) - scope-306
+        |
+        |---POValueInputTez - scope-376	<-	 scope-348
+Tez vertex scope-379
+# Plan on vertex
+POValueOutputTez - scope-384	->	 [scope-389, scope-385]
+|
+|---f1: Limit - scope-383
+    |
+    |---f1: New For Each(true)[bag] - scope-382
+        |   |
+        |   Project[tuple][1] - scope-381
+        |
+        |---f1: Package(Packager)[tuple]{tuple} - scope-380
+Tez vertex scope-385
+# Plan on vertex
+f1: Store(file:///tmp/output/f1:org.apache.pig.builtin.PigStorage) - scope-312
+|
+|---POValueInputTez - scope-386	<-	 scope-379
+Tez vertex scope-343
+# Plan on vertex
+POValueOutputTez - scope-345	->	 [scope-387, scope-346]
+|
+|---d1: Filter[bag] - scope-286
+    |   |
+    |   Equal To[boolean] - scope-289
+    |   |
+    |   |---Project[int][0] - scope-287
+    |   |
+    |   |---Constant(5) - scope-288
+    |
+    |---d: Filter[bag] - scope-282
+        |   |
+        |   Greater Than[boolean] - scope-285
+        |   |
+        |   |---Project[int][0] - scope-283
+        |   |
+        |   |---Constant(10) - scope-284
+        |
+        |---POValueInputTez - scope-344	<-	 scope-319
+Tez vertex scope-387
+# Plan on vertex
+f2: Store(file:///tmp/output/f2:org.apache.pig.builtin.PigStorage) - scope-416
+|
+|---POValueInputTez - scope-388	<-	 scope-343
+Tez vertex scope-389
+# Plan on vertex
+f2: Store(file:///tmp/output/f2:org.apache.pig.builtin.PigStorage) - scope-417
+|
+|---POValueInputTez - scope-390	<-	 scope-379
+Tez vertex group scope-415	<-	 [scope-387, scope-389]	->	 null
+# No plan on vertex group
+Tez vertex scope-346
+# Plan on vertex
+d1: Store(file:///tmp/output/d1:org.apache.pig.builtin.PigStorage) - scope-293
+|
+|---POValueInputTez - scope-347	<-	 scope-343
+Tez vertex scope-340
+# Plan on vertex
+c2: Local Rearrange[tuple]{int}(false) - scope-407	->	 scope-342
+|   |
+|   Project[int][0] - scope-409
+|
+|---c3: New For Each(false,false)[bag] - scope-395
+    |   |
+    |   Project[int][0] - scope-396
+    |   |
+    |   POUserFunc(org.apache.pig.builtin.AlgebraicMathBase$Initial)[tuple] - scope-397
+    |   |
+    |   |---Project[bag][0] - scope-398
+    |       |
+    |       |---Project[bag][1] - scope-399
+    |
+    |---Pre Combiner Local Rearrange[tuple]{Unknown} - scope-410
+        |
+        |---POValueInputTez - scope-341	<-	 scope-332
+Tez vertex scope-342
+# Combine plan on edge <scope-340>
+c2: Local Rearrange[tuple]{int}(false) - scope-411	->	 scope-342
+|   |
+|   Project[int][0] - scope-413
+|
+|---c3: New For Each(false,false)[bag] - scope-400
+    |   |
+    |   Project[int][0] - scope-401
+    |   |
+    |   POUserFunc(org.apache.pig.builtin.LongSum$Intermediate)[tuple] - scope-402
+    |   |
+    |   |---Project[bag][1] - scope-403
+    |
+    |---c2: Package(CombinerPackager)[tuple]{int} - scope-406
+# Plan on vertex
+c3: Store(file:///tmp/output/c1:org.apache.pig.builtin.PigStorage) - scope-281
+|
+|---c3: New For Each(false,false)[bag] - scope-280
+    |   |
+    |   Project[int][0] - scope-274
+    |   |
+    |   POUserFunc(org.apache.pig.builtin.LongSum$Final)[long] - scope-278
+    |   |
+    |   |---Project[bag][1] - scope-404
+    |
+    |---c2: Package(CombinerPackager)[tuple]{int} - scope-271
+Tez vertex scope-324
+# Plan on vertex
+b1: Local Rearrange[tuple]{int}(false) - scope-231	->	 scope-326
+|   |
+|   Project[int][0] - scope-232
+|
+|---POValueInputTez - scope-325	<-	 scope-321
+Tez vertex scope-326
+# Plan on vertex
+POValueOutputTez - scope-327	->	 [scope-330, scope-328]
+|
+|---b1: Package(Packager)[tuple]{int} - scope-230
+Tez vertex scope-328
+# Plan on vertex
+b1: Store(file:///tmp/output/b1:org.apache.pig.builtin.PigStorage) - scope-236
+|
+|---POValueInputTez - scope-329	<-	 scope-326
+Tez vertex scope-351
+# Plan on vertex
+Local Rearrange[tuple]{tuple}(false) - scope-355	->	 scope-359
+|   |
+|   Constant(DummyVal) - scope-354
+|
+|---ReservoirSample - scope-358
+    |
+    |---New For Each(false)[tuple] - scope-357
+        |   |
+        |   Project[int][0] - scope-356
+        |
+        |---e1: Local Rearrange[tuple]{int}(false) - scope-353	->	 scope-369
+            |   |
+            |   Project[int][0] - scope-301
+            |
+            |---e: Filter[bag] - scope-297
+                |   |
+                |   Less Than[boolean] - scope-300
+                |   |
+                |   |---Project[int][0] - scope-298
+                |   |
+                |   |---Constant(3) - scope-299
+                |
+                |---POValueInputTez - scope-352	<-	 scope-348
+Tez vertex scope-359
+# Plan on vertex
+POValueOutputTez - scope-368	->	 [scope-369]
+|
+|---New For Each(false)[tuple] - scope-367
+    |   |
+    |   POUserFunc(org.apache.pig.impl.builtin.FindQuantiles)[tuple] - scope-366
+    |   |
+    |   |---Project[tuple][*] - scope-365
+    |
+    |---New For Each(false,false)[tuple] - scope-364
+        |   |
+        |   Constant(1) - scope-363
+        |   |
+        |   Project[bag][1] - scope-361
+        |
+        |---Package(Packager)[tuple]{bytearray} - scope-360
+Tez vertex scope-369
+# Plan on vertex
+POIdentityInOutTez - scope-370	<-	 scope-351	->	 scope-371
+|   |
+|   Project[int][0] - scope-301
+Tez vertex scope-371
+# Plan on vertex
+e1: Store(file:///tmp/output/e1:org.apache.pig.builtin.PigStorage) - scope-303
+|
+|---New For Each(true)[tuple] - scope-374
+    |   |
+    |   Project[bag][1] - scope-373
+    |
+    |---Package(LitePackager)[tuple]{int} - scope-372
+Tez vertex scope-330
+# Plan on vertex
+b2: Store(file:///tmp/output/b2:org.apache.pig.builtin.PigStorage) - scope-246
+|
+|---b2: New For Each(false,false)[bag] - scope-245
+    |   |
+    |   Project[int][0] - scope-239
+    |   |
+    |   POUserFunc(org.apache.pig.builtin.LongSum)[long] - scope-243
+    |   |
+    |   |---Project[bag][0] - scope-242
+    |       |
+    |       |---Project[bag][1] - scope-241
+    |
+    |---POValueInputTez - scope-331	<-	 scope-326

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-2.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-2.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-2.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-2.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,250 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-212
+#--------------------------------------------------
+Tez vertex scope-106	->	Tez vertex scope-119,Tez vertex scope-113,Tez vertex scope-126,Tez vertex scope-156,Tez vertex scope-146,Tez vertex scope-166,Tez vertex scope-209,
+Tez vertex scope-166	->	Tez vertex scope-209,
+Tez vertex scope-209
+Tez vertex scope-113
+Tez vertex scope-119	->	Tez vertex scope-126,Tez vertex scope-129,
+Tez vertex scope-126
+Tez vertex scope-129
+Tez vertex scope-146	->	Tez vertex scope-156,
+Tez vertex scope-156	->	Tez vertex scope-158,
+Tez vertex scope-158
+
+Tez vertex scope-106
+# Plan on vertex
+1-1: Split - scope-208
+|   |
+|   b: Split - scope-205
+|   |   |
+|   |   b1: Local Rearrange[tuple]{int}(false) - scope-18	->	 scope-113
+|   |   |   |
+|   |   |   Project[int][0] - scope-19
+|   |   |
+|   |   c1: Local Rearrange[tuple]{int}(false) - scope-49	->	 scope-126
+|   |   |   |
+|   |   |   Project[int][0] - scope-50
+|   |   |
+|   |   1-2: Split - scope-204
+|   |   |   |
+|   |   |   Local Rearrange[tuple]{tuple}(false) - scope-142	->	 scope-146
+|   |   |   |   |
+|   |   |   |   Constant(DummyVal) - scope-141
+|   |   |   |
+|   |   |   |---ReservoirSample - scope-145
+|   |   |       |
+|   |   |       |---New For Each(false)[tuple] - scope-144
+|   |   |           |   |
+|   |   |           |   Project[int][0] - scope-143
+|   |   |           |
+|   |   |           |---e1: Local Rearrange[tuple]{int}(false) - scope-140	->	 scope-156
+|   |   |               |   |
+|   |   |               |   Project[int][0] - scope-88
+|   |   |               |
+|   |   |               |---e: Filter[bag] - scope-84
+|   |   |                   |   |
+|   |   |                   |   Less Than[boolean] - scope-87
+|   |   |                   |   |
+|   |   |                   |   |---Project[int][0] - scope-85
+|   |   |                   |   |
+|   |   |                   |   |---Constant(3) - scope-86
+|   |   |   |
+|   |   |   f1: Local Rearrange[tuple]{tuple}(false) - scope-165	->	 scope-166
+|   |   |   |   |
+|   |   |   |   Project[tuple][*] - scope-164
+|   |   |   |
+|   |   |   |---f1: Limit - scope-95
+|   |   |       |
+|   |   |       |---f: Filter[bag] - scope-91
+|   |   |           |   |
+|   |   |           |   Greater Than or Equal[boolean] - scope-94
+|   |   |           |   |
+|   |   |           |   |---Project[int][0] - scope-92
+|   |   |           |   |
+|   |   |           |   |---Constant(3) - scope-93
+|   |
+|   |---b: Filter[bag] - scope-9
+|       |   |
+|       |   Less Than or Equal[boolean] - scope-12
+|       |   |
+|       |   |---Project[int][0] - scope-10
+|       |   |
+|       |   |---Constant(5) - scope-11
+|   |
+|   d1: Split - scope-207
+|   |   |
+|   |   d1: Store(file:///tmp/output/d1:org.apache.pig.builtin.PigStorage) - scope-80
+|   |   |
+|   |   f2: Store(file:///tmp/output/f2:org.apache.pig.builtin.PigStorage) - scope-210
+|   |
+|   |---d1: Filter[bag] - scope-73
+|       |   |
+|       |   Equal To[boolean] - scope-76
+|       |   |
+|       |   |---Project[int][0] - scope-74
+|       |   |
+|       |   |---Constant(5) - scope-75
+|       |
+|       |---d: Filter[bag] - scope-69
+|           |   |
+|           |   Greater Than[boolean] - scope-72
+|           |   |
+|           |   |---Project[int][0] - scope-70
+|           |   |
+|           |   |---Constant(10) - scope-71
+|   |
+|   POValueOutputTez - scope-107	->	 [scope-119]
+|
+|---a: New For Each(false,false)[bag] - scope-7
+    |   |
+    |   Cast[int] - scope-2
+    |   |
+    |   |---Project[bytearray][0] - scope-1
+    |   |
+    |   Cast[int] - scope-5
+    |   |
+    |   |---Project[bytearray][1] - scope-4
+    |
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-0
+Tez vertex scope-166
+# Plan on vertex
+f1: Split - scope-203
+|   |
+|   f1: Store(file:///tmp/output/f1:org.apache.pig.builtin.PigStorage) - scope-99
+|   |
+|   f2: Store(file:///tmp/output/f2:org.apache.pig.builtin.PigStorage) - scope-211
+|
+|---f1: Limit - scope-170
+    |
+    |---f1: New For Each(true)[bag] - scope-169
+        |   |
+        |   Project[tuple][1] - scope-168
+        |
+        |---f1: Package(Packager)[tuple]{tuple} - scope-167
+Tez vertex group scope-209	<-	 [scope-106, scope-166]	->	 null
+# No plan on vertex group
+Tez vertex scope-113
+# Plan on vertex
+b1: Split - scope-202
+|   |
+|   b1: Store(file:///tmp/output/b1:org.apache.pig.builtin.PigStorage) - scope-23
+|   |
+|   b2: Store(file:///tmp/output/b2:org.apache.pig.builtin.PigStorage) - scope-33
+|   |
+|   |---b2: New For Each(false,false)[bag] - scope-32
+|       |   |
+|       |   Project[int][0] - scope-26
+|       |   |
+|       |   POUserFunc(org.apache.pig.builtin.LongSum)[long] - scope-30
+|       |   |
+|       |   |---Project[bag][0] - scope-29
+|       |       |
+|       |       |---Project[bag][1] - scope-28
+|
+|---b1: Package(Packager)[tuple]{int} - scope-17
+Tez vertex scope-119
+# Plan on vertex
+c: Split - scope-206
+|   |
+|   c1: Local Rearrange[tuple]{int}(false) - scope-47	->	 scope-126
+|   |   |
+|   |   Project[int][0] - scope-48
+|   |
+|   c2: Local Rearrange[tuple]{int}(false) - scope-194	->	 scope-129
+|   |   |
+|   |   Project[int][0] - scope-196
+|   |
+|   |---c3: New For Each(false,false)[bag] - scope-182
+|       |   |
+|       |   Project[int][0] - scope-183
+|       |   |
+|       |   POUserFunc(org.apache.pig.builtin.AlgebraicMathBase$Initial)[tuple] - scope-184
+|       |   |
+|       |   |---Project[bag][0] - scope-185
+|       |       |
+|       |       |---Project[bag][1] - scope-186
+|       |
+|       |---Pre Combiner Local Rearrange[tuple]{Unknown} - scope-197
+|
+|---c: Filter[bag] - scope-34
+    |   |
+    |   Less Than or Equal[boolean] - scope-37
+    |   |
+    |   |---Project[int][0] - scope-35
+    |   |
+    |   |---Constant(10) - scope-36
+    |
+    |---POValueInputTez - scope-120	<-	 scope-106
+Tez vertex scope-126
+# Plan on vertex
+c1: Store(file:///tmp/output/c1:org.apache.pig.builtin.PigStorage) - scope-54
+|
+|---c1: New For Each(true,true)[tuple] - scope-53
+    |   |
+    |   Project[bag][1] - scope-51
+    |   |
+    |   Project[bag][2] - scope-52
+    |
+    |---c1: Package(Packager)[tuple]{int} - scope-46
+Tez vertex scope-129
+# Combine plan on edge <scope-119>
+c2: Local Rearrange[tuple]{int}(false) - scope-198	->	 scope-129
+|   |
+|   Project[int][0] - scope-200
+|
+|---c3: New For Each(false,false)[bag] - scope-187
+    |   |
+    |   Project[int][0] - scope-188
+    |   |
+    |   POUserFunc(org.apache.pig.builtin.LongSum$Intermediate)[tuple] - scope-189
+    |   |
+    |   |---Project[bag][1] - scope-190
+    |
+    |---c2: Package(CombinerPackager)[tuple]{int} - scope-193
+# Plan on vertex
+c3: Store(file:///tmp/output/c1:org.apache.pig.builtin.PigStorage) - scope-68
+|
+|---c3: New For Each(false,false)[bag] - scope-67
+    |   |
+    |   Project[int][0] - scope-61
+    |   |
+    |   POUserFunc(org.apache.pig.builtin.LongSum$Final)[long] - scope-65
+    |   |
+    |   |---Project[bag][1] - scope-191
+    |
+    |---c2: Package(CombinerPackager)[tuple]{int} - scope-58
+Tez vertex scope-146
+# Plan on vertex
+POValueOutputTez - scope-155	->	 [scope-156]
+|
+|---New For Each(false)[tuple] - scope-154
+    |   |
+    |   POUserFunc(org.apache.pig.impl.builtin.FindQuantiles)[tuple] - scope-153
+    |   |
+    |   |---Project[tuple][*] - scope-152
+    |
+    |---New For Each(false,false)[tuple] - scope-151
+        |   |
+        |   Constant(1) - scope-150
+        |   |
+        |   Project[bag][1] - scope-148
+        |
+        |---Package(Packager)[tuple]{bytearray} - scope-147
+Tez vertex scope-156
+# Plan on vertex
+POIdentityInOutTez - scope-157	<-	 scope-106	->	 scope-158
+|   |
+|   Project[int][0] - scope-88
+Tez vertex scope-158
+# Plan on vertex
+e1: Store(file:///tmp/output/e1:org.apache.pig.builtin.PigStorage) - scope-90
+|
+|---New For Each(true)[tuple] - scope-161
+    |   |
+    |   Project[bag][1] - scope-160
+    |
+    |---Package(LitePackager)[tuple]{int} - scope-159

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-3-OPTOFF.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-3-OPTOFF.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-3-OPTOFF.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-3-OPTOFF.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,119 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-174
+#--------------------------------------------------
+Tez vertex scope-126	->	Tez vertex scope-128,Tez vertex scope-131,
+Tez vertex scope-131	->	Tez vertex scope-133,
+Tez vertex scope-133
+Tez vertex scope-128	->	Tez vertex scope-130,
+Tez vertex scope-130
+
+Tez vertex scope-126
+# Plan on vertex
+POValueOutputTez - scope-127	->	 [scope-128, scope-131]
+|
+|---a: New For Each(false,false)[bag] - scope-95
+    |   |
+    |   Cast[int] - scope-90
+    |   |
+    |   |---Project[bytearray][0] - scope-89
+    |   |
+    |   Cast[int] - scope-93
+    |   |
+    |   |---Project[bytearray][1] - scope-92
+    |
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-88
+Tez vertex scope-131
+# Plan on vertex
+c: Local Rearrange[tuple]{tuple}(false) - scope-165	->	 scope-133
+|   |
+|   Project[tuple][0] - scope-168
+|
+|---c: New For Each(false,false)[bag] - scope-153
+    |   |
+    |   Project[tuple][0] - scope-154
+    |   |
+    |   POUserFunc(org.apache.pig.builtin.COUNT$Initial)[tuple] - scope-155
+    |   |
+    |   |---Project[bag][1] - scope-156
+    |       |
+    |       |---Project[bag][1] - scope-157
+    |
+    |---Pre Combiner Local Rearrange[tuple]{Unknown} - scope-169
+        |
+        |---POValueInputTez - scope-132	<-	 scope-126
+Tez vertex scope-133
+# Combine plan on edge <scope-131>
+c: Local Rearrange[tuple]{tuple}(false) - scope-170	->	 scope-133
+|   |
+|   Project[tuple][0] - scope-173
+|
+|---c: New For Each(false,false)[bag] - scope-158
+    |   |
+    |   Project[tuple][0] - scope-159
+    |   |
+    |   POUserFunc(org.apache.pig.builtin.COUNT$Intermediate)[tuple] - scope-160
+    |   |
+    |   |---Project[bag][1] - scope-161
+    |
+    |---c: Package(CombinerPackager)[tuple]{tuple} - scope-164
+# Plan on vertex
+c: Store(file:///tmp/output/c:org.apache.pig.builtin.PigStorage) - scope-125
+|
+|---c: New For Each(false,false)[bag] - scope-124
+    |   |
+    |   Project[tuple][0] - scope-118
+    |   |
+    |   POUserFunc(org.apache.pig.builtin.COUNT$Final)[long] - scope-122
+    |   |
+    |   |---Project[bag][1] - scope-162
+    |
+    |---c: Package(CombinerPackager)[tuple]{tuple} - scope-114
+Tez vertex scope-128
+# Plan on vertex
+b: Local Rearrange[tuple]{int}(false) - scope-146	->	 scope-130
+|   |
+|   Project[int][0] - scope-148
+|
+|---b: New For Each(false,false)[bag] - scope-134
+    |   |
+    |   Project[int][0] - scope-135
+    |   |
+    |   POUserFunc(org.apache.pig.builtin.COUNT$Initial)[tuple] - scope-136
+    |   |
+    |   |---Project[bag][0] - scope-137
+    |       |
+    |       |---Project[bag][1] - scope-138
+    |
+    |---Pre Combiner Local Rearrange[tuple]{Unknown} - scope-149
+        |
+        |---POValueInputTez - scope-129	<-	 scope-126
+Tez vertex scope-130
+# Combine plan on edge <scope-128>
+b: Local Rearrange[tuple]{int}(false) - scope-150	->	 scope-130
+|   |
+|   Project[int][0] - scope-152
+|
+|---b: New For Each(false,false)[bag] - scope-139
+    |   |
+    |   Project[int][0] - scope-140
+    |   |
+    |   POUserFunc(org.apache.pig.builtin.COUNT$Intermediate)[tuple] - scope-141
+    |   |
+    |   |---Project[bag][1] - scope-142
+    |
+    |---b: Package(CombinerPackager)[tuple]{int} - scope-145
+# Plan on vertex
+b: Store(file:///tmp/output/b:org.apache.pig.builtin.PigStorage) - scope-110
+|
+|---b: New For Each(false,false)[bag] - scope-109
+    |   |
+    |   Project[int][0] - scope-103
+    |   |
+    |   POUserFunc(org.apache.pig.builtin.COUNT$Final)[long] - scope-107
+    |   |
+    |   |---Project[bag][1] - scope-143
+    |
+    |---b: Package(CombinerPackager)[tuple]{int} - scope-100

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-3.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-3.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-3.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-3.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,111 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-87
+#--------------------------------------------------
+Tez vertex scope-38	->	Tez vertex scope-42,Tez vertex scope-45,
+Tez vertex scope-45
+Tez vertex scope-42
+
+Tez vertex scope-38
+# Plan on vertex
+a: Split - scope-86
+|   |
+|   b: Local Rearrange[tuple]{int}(false) - scope-58	->	 scope-42
+|   |   |
+|   |   Project[int][0] - scope-60
+|   |
+|   |---b: New For Each(false,false)[bag] - scope-46
+|       |   |
+|       |   Project[int][0] - scope-47
+|       |   |
+|       |   POUserFunc(org.apache.pig.builtin.COUNT$Initial)[tuple] - scope-48
+|       |   |
+|       |   |---Project[bag][0] - scope-49
+|       |       |
+|       |       |---Project[bag][1] - scope-50
+|       |
+|       |---Pre Combiner Local Rearrange[tuple]{Unknown} - scope-61
+|   |
+|   c: Local Rearrange[tuple]{tuple}(false) - scope-77	->	 scope-45
+|   |   |
+|   |   Project[tuple][0] - scope-80
+|   |
+|   |---c: New For Each(false,false)[bag] - scope-65
+|       |   |
+|       |   Project[tuple][0] - scope-66
+|       |   |
+|       |   POUserFunc(org.apache.pig.builtin.COUNT$Initial)[tuple] - scope-67
+|       |   |
+|       |   |---Project[bag][1] - scope-68
+|       |       |
+|       |       |---Project[bag][1] - scope-69
+|       |
+|       |---Pre Combiner Local Rearrange[tuple]{Unknown} - scope-81
+|
+|---a: New For Each(false,false)[bag] - scope-7
+    |   |
+    |   Cast[int] - scope-2
+    |   |
+    |   |---Project[bytearray][0] - scope-1
+    |   |
+    |   Cast[int] - scope-5
+    |   |
+    |   |---Project[bytearray][1] - scope-4
+    |
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-0
+Tez vertex scope-45
+# Combine plan on edge <scope-38>
+c: Local Rearrange[tuple]{tuple}(false) - scope-82	->	 scope-45
+|   |
+|   Project[tuple][0] - scope-85
+|
+|---c: New For Each(false,false)[bag] - scope-70
+    |   |
+    |   Project[tuple][0] - scope-71
+    |   |
+    |   POUserFunc(org.apache.pig.builtin.COUNT$Intermediate)[tuple] - scope-72
+    |   |
+    |   |---Project[bag][1] - scope-73
+    |
+    |---c: Package(CombinerPackager)[tuple]{tuple} - scope-76
+# Plan on vertex
+c: Store(file:///tmp/output/c:org.apache.pig.builtin.PigStorage) - scope-37
+|
+|---c: New For Each(false,false)[bag] - scope-36
+    |   |
+    |   Project[tuple][0] - scope-30
+    |   |
+    |   POUserFunc(org.apache.pig.builtin.COUNT$Final)[long] - scope-34
+    |   |
+    |   |---Project[bag][1] - scope-74
+    |
+    |---c: Package(CombinerPackager)[tuple]{tuple} - scope-26
+Tez vertex scope-42
+# Combine plan on edge <scope-38>
+b: Local Rearrange[tuple]{int}(false) - scope-62	->	 scope-42
+|   |
+|   Project[int][0] - scope-64
+|
+|---b: New For Each(false,false)[bag] - scope-51
+    |   |
+    |   Project[int][0] - scope-52
+    |   |
+    |   POUserFunc(org.apache.pig.builtin.COUNT$Intermediate)[tuple] - scope-53
+    |   |
+    |   |---Project[bag][1] - scope-54
+    |
+    |---b: Package(CombinerPackager)[tuple]{int} - scope-57
+# Plan on vertex
+b: Store(file:///tmp/output/b:org.apache.pig.builtin.PigStorage) - scope-22
+|
+|---b: New For Each(false,false)[bag] - scope-21
+    |   |
+    |   Project[int][0] - scope-15
+    |   |
+    |   POUserFunc(org.apache.pig.builtin.COUNT$Final)[long] - scope-19
+    |   |
+    |   |---Project[bag][1] - scope-55
+    |
+    |---b: Package(CombinerPackager)[tuple]{int} - scope-12

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-4-OPTOFF.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-4-OPTOFF.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-4-OPTOFF.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-4-OPTOFF.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,91 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-128
+#--------------------------------------------------
+Tez vertex scope-118	->	Tez vertex scope-120,
+Tez vertex scope-119	->	Tez vertex scope-120,
+Tez vertex scope-120	->	Tez vertex scope-122,Tez vertex scope-124,Tez vertex scope-126,
+Tez vertex scope-122
+Tez vertex scope-124
+Tez vertex scope-126
+
+Tez vertex scope-118
+# Plan on vertex
+c: Local Rearrange[tuple]{int}(false) - scope-85	->	 scope-120
+|   |
+|   Project[int][0] - scope-86
+|
+|---a: New For Each(false,false)[bag] - scope-72
+    |   |
+    |   Cast[int] - scope-67
+    |   |
+    |   |---Project[bytearray][0] - scope-66
+    |   |
+    |   Cast[int] - scope-70
+    |   |
+    |   |---Project[bytearray][1] - scope-69
+    |
+    |---a: Load(file:///tmp/input1:org.apache.pig.builtin.PigStorage) - scope-65
+Tez vertex scope-119
+# Plan on vertex
+c: Local Rearrange[tuple]{int}(false) - scope-87	->	 scope-120
+|   |
+|   Project[int][0] - scope-88
+|
+|---b: New For Each(false,false)[bag] - scope-80
+    |   |
+    |   Cast[int] - scope-75
+    |   |
+    |   |---Project[bytearray][0] - scope-74
+    |   |
+    |   Cast[int] - scope-78
+    |   |
+    |   |---Project[bytearray][1] - scope-77
+    |
+    |---b: Load(file:///tmp/input2:org.apache.pig.builtin.PigStorage) - scope-73
+Tez vertex scope-120
+# Plan on vertex
+POValueOutputTez - scope-121	->	 [scope-122, scope-124, scope-126]
+|
+|---c: New For Each(true,true)[tuple] - scope-91
+    |   |
+    |   Project[bag][1] - scope-89
+    |   |
+    |   Project[bag][2] - scope-90
+    |
+    |---c: Package(Packager)[tuple]{int} - scope-84
+Tez vertex scope-122
+# Plan on vertex
+c: Store(file:///tmp/output/c:org.apache.pig.builtin.PigStorage) - scope-95
+|
+|---POValueInputTez - scope-123	<-	 scope-120
+Tez vertex scope-124
+# Plan on vertex
+d: Store(file:///tmp/output/d:org.apache.pig.builtin.PigStorage) - scope-105
+|
+|---d: New For Each(false,false,false)[bag] - scope-104
+    |   |
+    |   Project[int][0] - scope-98
+    |   |
+    |   Project[int][1] - scope-100
+    |   |
+    |   Project[int][3] - scope-102
+    |
+    |---POValueInputTez - scope-125	<-	 scope-120
+Tez vertex scope-126
+# Plan on vertex
+e: Store(file:///tmp/output/e:org.apache.pig.builtin.PigStorage) - scope-117
+|
+|---e: New For Each(false,false,false,false)[bag] - scope-116
+    |   |
+    |   Project[int][0] - scope-108
+    |   |
+    |   Project[int][1] - scope-110
+    |   |
+    |   Project[int][2] - scope-112
+    |   |
+    |   Project[int][3] - scope-114
+    |
+    |---POValueInputTez - scope-127	<-	 scope-120

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-4.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-4.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-4.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-4.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,79 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-64
+#--------------------------------------------------
+Tez vertex scope-53	->	Tez vertex scope-55,
+Tez vertex scope-54	->	Tez vertex scope-55,
+Tez vertex scope-55
+
+Tez vertex scope-53
+# Plan on vertex
+c: Local Rearrange[tuple]{int}(false) - scope-20	->	 scope-55
+|   |
+|   Project[int][0] - scope-21
+|
+|---a: New For Each(false,false)[bag] - scope-7
+    |   |
+    |   Cast[int] - scope-2
+    |   |
+    |   |---Project[bytearray][0] - scope-1
+    |   |
+    |   Cast[int] - scope-5
+    |   |
+    |   |---Project[bytearray][1] - scope-4
+    |
+    |---a: Load(file:///tmp/input1:org.apache.pig.builtin.PigStorage) - scope-0
+Tez vertex scope-54
+# Plan on vertex
+c: Local Rearrange[tuple]{int}(false) - scope-22	->	 scope-55
+|   |
+|   Project[int][0] - scope-23
+|
+|---b: New For Each(false,false)[bag] - scope-15
+    |   |
+    |   Cast[int] - scope-10
+    |   |
+    |   |---Project[bytearray][0] - scope-9
+    |   |
+    |   Cast[int] - scope-13
+    |   |
+    |   |---Project[bytearray][1] - scope-12
+    |
+    |---b: Load(file:///tmp/input2:org.apache.pig.builtin.PigStorage) - scope-8
+Tez vertex scope-55
+# Plan on vertex
+c: Split - scope-63
+|   |
+|   c: Store(file:///tmp/output/c:org.apache.pig.builtin.PigStorage) - scope-30
+|   |
+|   d: Store(file:///tmp/output/d:org.apache.pig.builtin.PigStorage) - scope-40
+|   |
+|   |---d: New For Each(false,false,false)[bag] - scope-39
+|       |   |
+|       |   Project[int][0] - scope-33
+|       |   |
+|       |   Project[int][1] - scope-35
+|       |   |
+|       |   Project[int][3] - scope-37
+|   |
+|   e: Store(file:///tmp/output/e:org.apache.pig.builtin.PigStorage) - scope-52
+|   |
+|   |---e: New For Each(false,false,false,false)[bag] - scope-51
+|       |   |
+|       |   Project[int][0] - scope-43
+|       |   |
+|       |   Project[int][1] - scope-45
+|       |   |
+|       |   Project[int][2] - scope-47
+|       |   |
+|       |   Project[int][3] - scope-49
+|
+|---c: New For Each(true,true)[tuple] - scope-26
+    |   |
+    |   Project[bag][1] - scope-24
+    |   |
+    |   Project[bag][2] - scope-25
+    |
+    |---c: Package(Packager)[tuple]{int} - scope-19

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-5-OPTOFF.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-5-OPTOFF.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-5-OPTOFF.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-5-OPTOFF.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,81 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-117
+#--------------------------------------------------
+Tez vertex scope-103	->	Tez vertex scope-104,
+Tez vertex scope-104	->	Tez vertex scope-106,Tez vertex scope-108,Tez vertex scope-110,
+Tez vertex scope-110	->	Tez vertex scope-113,Tez vertex scope-115,
+Tez vertex scope-113
+Tez vertex scope-115
+Tez vertex scope-106
+Tez vertex scope-108
+
+Tez vertex scope-103
+# Plan on vertex
+b: Local Rearrange[tuple]{int}(false) - scope-70	->	 scope-104
+|   |
+|   Project[int][0] - scope-71
+|
+|---a: New For Each(false,false)[bag] - scope-67
+    |   |
+    |   Cast[int] - scope-62
+    |   |
+    |   |---Project[bytearray][0] - scope-61
+    |   |
+    |   Cast[int] - scope-65
+    |   |
+    |   |---Project[bytearray][1] - scope-64
+    |
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-60
+Tez vertex scope-104
+# Plan on vertex
+POValueOutputTez - scope-105	->	 [scope-106, scope-108, scope-110]
+|
+|---b: Package(Packager)[tuple]{int} - scope-69
+Tez vertex scope-110
+# Plan on vertex
+POValueOutputTez - scope-112	->	 [scope-113, scope-115]
+|
+|---d: New For Each(true)[bag] - scope-90
+    |   |
+    |   Project[bag][1] - scope-88
+    |
+    |---POValueInputTez - scope-111	<-	 scope-104
+Tez vertex scope-113
+# Plan on vertex
+d: Store(file:///tmp/output/d:org.apache.pig.builtin.PigStorage) - scope-94
+|
+|---POValueInputTez - scope-114	<-	 scope-110
+Tez vertex scope-115
+# Plan on vertex
+e: Store(file:///tmp/output/e:org.apache.pig.builtin.PigStorage) - scope-102
+|
+|---e: New For Each(false,false)[bag] - scope-101
+    |   |
+    |   Project[int][0] - scope-97
+    |   |
+    |   Project[int][1] - scope-99
+    |
+    |---POValueInputTez - scope-116	<-	 scope-110
+Tez vertex scope-106
+# Plan on vertex
+b: Store(file:///tmp/output/b:org.apache.pig.builtin.PigStorage) - scope-75
+|
+|---POValueInputTez - scope-107	<-	 scope-104
+Tez vertex scope-108
+# Plan on vertex
+c: Store(file:///tmp/output/c:org.apache.pig.builtin.PigStorage) - scope-85
+|
+|---c: New For Each(false,false)[bag] - scope-84
+    |   |
+    |   Project[bag][0] - scope-79
+    |   |
+    |   |---Project[bag][1] - scope-78
+    |   |
+    |   Project[bag][1] - scope-82
+    |   |
+    |   |---Project[bag][1] - scope-81
+    |
+    |---POValueInputTez - scope-109	<-	 scope-104

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-5.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-5.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-5.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-MQ-5.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,61 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-59
+#--------------------------------------------------
+Tez vertex scope-43	->	Tez vertex scope-44,
+Tez vertex scope-44
+
+Tez vertex scope-43
+# Plan on vertex
+b: Local Rearrange[tuple]{int}(false) - scope-10	->	 scope-44
+|   |
+|   Project[int][0] - scope-11
+|
+|---a: New For Each(false,false)[bag] - scope-7
+    |   |
+    |   Cast[int] - scope-2
+    |   |
+    |   |---Project[bytearray][0] - scope-1
+    |   |
+    |   Cast[int] - scope-5
+    |   |
+    |   |---Project[bytearray][1] - scope-4
+    |
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-0
+Tez vertex scope-44
+# Plan on vertex
+b: Split - scope-58
+|   |
+|   b: Store(file:///tmp/output/b:org.apache.pig.builtin.PigStorage) - scope-15
+|   |
+|   c: Store(file:///tmp/output/c:org.apache.pig.builtin.PigStorage) - scope-25
+|   |
+|   |---c: New For Each(false,false)[bag] - scope-24
+|       |   |
+|       |   Project[bag][0] - scope-19
+|       |   |
+|       |   |---Project[bag][1] - scope-18
+|       |   |
+|       |   Project[bag][1] - scope-22
+|       |   |
+|       |   |---Project[bag][1] - scope-21
+|   |
+|   d: Split - scope-57
+|   |   |
+|   |   d: Store(file:///tmp/output/d:org.apache.pig.builtin.PigStorage) - scope-34
+|   |   |
+|   |   e: Store(file:///tmp/output/e:org.apache.pig.builtin.PigStorage) - scope-42
+|   |   |
+|   |   |---e: New For Each(false,false)[bag] - scope-41
+|   |       |   |
+|   |       |   Project[int][0] - scope-37
+|   |       |   |
+|   |       |   Project[int][1] - scope-39
+|   |
+|   |---d: New For Each(true)[bag] - scope-30
+|       |   |
+|       |   Project[bag][1] - scope-28
+|
+|---b: Package(Packager)[tuple]{int} - scope-9

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Rank-1.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Rank-1.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Rank-1.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Rank-1.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,33 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-15
+#--------------------------------------------------
+Tez vertex scope-11	->	Tez vertex scope-14,Tez vertex scope-12,
+Tez vertex scope-12	->	Tez vertex scope-14,
+Tez vertex scope-14
+
+Tez vertex scope-11
+# Plan on vertex
+POCounterTez - scope-8	->	 scope-14,scope-12
+|
+|---a: New For Each(false,false)[bag] - scope-7
+    |   |
+    |   Cast[int] - scope-2
+    |   |
+    |   |---Project[bytearray][0] - scope-1
+    |   |
+    |   Cast[int] - scope-5
+    |   |
+    |   |---Project[bytearray][1] - scope-4
+    |
+    |---a: Load(file:///tmp/input1:org.apache.pig.builtin.PigStorage) - scope-0
+Tez vertex scope-12
+# Plan on vertex
+PORankStatsTez - scope-13	<-	 scope-11	->	 scope-14
+Tez vertex scope-14
+# Plan on vertex
+b: Store(file:///tmp/output/d:org.apache.pig.builtin.PigStorage) - scope-10
+|
+|---PORankTez - scope-9	<-	 scope-11,scope-12

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Rank-2.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Rank-2.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Rank-2.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Rank-2.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,103 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-51
+#--------------------------------------------------
+Tez vertex scope-23	->	Tez vertex scope-24,
+Tez vertex scope-24	->	Tez vertex scope-41,Tez vertex scope-31,
+Tez vertex scope-31	->	Tez vertex scope-41,
+Tez vertex scope-41	->	Tez vertex scope-43,
+Tez vertex scope-43	->	Tez vertex scope-49,Tez vertex scope-47,
+Tez vertex scope-47	->	Tez vertex scope-49,
+Tez vertex scope-49
+
+Tez vertex scope-23
+# Plan on vertex
+b: Local Rearrange[tuple]{int}(false) - scope-10	->	 scope-24
+|   |
+|   Project[int][0] - scope-11
+|
+|---a: New For Each(false,false)[bag] - scope-7
+    |   |
+    |   Cast[int] - scope-2
+    |   |
+    |   |---Project[bytearray][0] - scope-1
+    |   |
+    |   Cast[int] - scope-5
+    |   |
+    |   |---Project[bytearray][1] - scope-4
+    |
+    |---a: Load(file:///tmp/input1:org.apache.pig.builtin.PigStorage) - scope-0
+Tez vertex scope-24
+# Plan on vertex
+Local Rearrange[tuple]{tuple}(false) - scope-27	->	 scope-31
+|   |
+|   Constant(DummyVal) - scope-26
+|
+|---ReservoirSample - scope-30
+    |
+    |---New For Each(false)[tuple] - scope-29
+        |   |
+        |   Project[int][0] - scope-28
+        |
+        |---b: Local Rearrange[tuple]{int}(false) - scope-25	->	 scope-41
+            |   |
+            |   Project[int][0] - scope-15
+            |
+            |---New For Each(true,false)[tuple] - scope-14
+                |   |
+                |   Project[int][0] - scope-12
+                |   |
+                |   Project[bag][1] - scope-13
+                |
+                |---b: Package(Packager)[tuple]{int} - scope-9
+Tez vertex scope-31
+# Plan on vertex
+POValueOutputTez - scope-40	->	 [scope-41]
+|
+|---New For Each(false)[tuple] - scope-39
+    |   |
+    |   POUserFunc(org.apache.pig.impl.builtin.FindQuantiles)[tuple] - scope-38
+    |   |
+    |   |---Project[tuple][*] - scope-37
+    |
+    |---New For Each(false,false)[tuple] - scope-36
+        |   |
+        |   Constant(1) - scope-35
+        |   |
+        |   Project[bag][1] - scope-33
+        |
+        |---Package(Packager)[tuple]{bytearray} - scope-32
+Tez vertex scope-41
+# Plan on vertex
+POIdentityInOutTez - scope-42	<-	 scope-24	->	 scope-43
+|   |
+|   Project[int][0] - scope-15
+Tez vertex scope-43
+# Plan on vertex
+POCounterTez - scope-17	->	 scope-49,scope-47
+|   |
+|   Project[int][0] - scope-15
+|
+|---New For Each(true)[tuple] - scope-46
+    |   |
+    |   Project[bag][1] - scope-45
+    |
+    |---Package(LitePackager)[tuple]{int} - scope-44
+Tez vertex scope-47
+# Plan on vertex
+PORankStatsTez - scope-48	<-	 scope-43	->	 scope-49
+Tez vertex scope-49
+# Plan on vertex
+b: Store(file:///tmp/output/d:org.apache.pig.builtin.PigStorage) - scope-22
+|
+|---New For Each(false,true)[tuple] - scope-21
+    |   |
+    |   Project[long][0] - scope-19
+    |   |
+    |   Project[bag][2] - scope-20
+    |
+    |---PORankTez - scope-18	<-	 scope-43,scope-47
+        |   |
+        |   Project[int][0] - scope-15

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-1-OPTOFF.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-1-OPTOFF.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-1-OPTOFF.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-1-OPTOFF.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,45 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-52
+#--------------------------------------------------
+Tez vertex scope-46	->	Tez vertex scope-48,
+Tez vertex scope-47	->	Tez vertex scope-48,
+Tez vertex scope-48
+
+Tez vertex scope-46
+# Plan on vertex
+POValueOutputTez - scope-50	->	 [scope-48]
+|
+|---a: New For Each(false,false)[bag] - scope-35
+    |   |
+    |   Cast[int] - scope-30
+    |   |
+    |   |---Project[bytearray][0] - scope-29
+    |   |
+    |   Cast[chararray] - scope-33
+    |   |
+    |   |---Project[bytearray][1] - scope-32
+    |
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-28
+Tez vertex scope-47
+# Plan on vertex
+POValueOutputTez - scope-51	->	 [scope-48]
+|
+|---c: New For Each(false,false)[bag] - scope-43
+    |   |
+    |   Cast[int] - scope-38
+    |   |
+    |   |---Project[bytearray][1] - scope-37
+    |   |
+    |   Cast[chararray] - scope-41
+    |   |
+    |   |---Project[bytearray][0] - scope-40
+    |
+    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-36
+Tez vertex scope-48
+# Plan on vertex
+c: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-45
+|
+|---POShuffledValueInputTez - scope-49	<-	 [scope-46, scope-47]

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-1.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-1.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-1.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-1.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,42 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-27
+#--------------------------------------------------
+Tez vertex scope-18	->	Tez vertex scope-24,
+Tez vertex scope-19	->	Tez vertex scope-24,
+Tez vertex scope-24
+
+Tez vertex scope-18
+# Plan on vertex
+c: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-25
+|
+|---a: New For Each(false,false)[bag] - scope-7
+    |   |
+    |   Cast[int] - scope-2
+    |   |
+    |   |---Project[bytearray][0] - scope-1
+    |   |
+    |   Cast[chararray] - scope-5
+    |   |
+    |   |---Project[bytearray][1] - scope-4
+    |
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-0
+Tez vertex scope-19
+# Plan on vertex
+c: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-26
+|
+|---c: New For Each(false,false)[bag] - scope-15
+    |   |
+    |   Cast[int] - scope-10
+    |   |
+    |   |---Project[bytearray][1] - scope-9
+    |   |
+    |   Cast[chararray] - scope-13
+    |   |
+    |   |---Project[bytearray][0] - scope-12
+    |
+    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-8
+Tez vertex group scope-24	<-	 [scope-18, scope-19]	->	 null
+# No plan on vertex group

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-10-OPTOFF.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-10-OPTOFF.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-10-OPTOFF.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-10-OPTOFF.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,75 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-43
+#--------------------------------------------------
+Tez vertex scope-31	->	Tez vertex scope-33,
+Tez vertex scope-32	->	Tez vertex scope-33,
+Tez vertex scope-33	->	Tez vertex scope-38,
+Tez vertex scope-37	->	Tez vertex scope-38,
+Tez vertex scope-38	->	Tez vertex scope-42,
+Tez vertex scope-42
+
+Tez vertex scope-31
+# Plan on vertex
+POValueOutputTez - scope-35	->	 [scope-33]
+|
+|---a: New For Each(false,false)[bag] - scope-7
+    |   |
+    |   Cast[int] - scope-2
+    |   |
+    |   |---Project[bytearray][0] - scope-1
+    |   |
+    |   Cast[chararray] - scope-5
+    |   |
+    |   |---Project[bytearray][1] - scope-4
+    |
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-0
+Tez vertex scope-32
+# Plan on vertex
+POValueOutputTez - scope-36	->	 [scope-33]
+|
+|---c: New For Each(false,false)[bag] - scope-15
+    |   |
+    |   Cast[int] - scope-10
+    |   |
+    |   |---Project[bytearray][1] - scope-9
+    |   |
+    |   Cast[chararray] - scope-13
+    |   |
+    |   |---Project[bytearray][0] - scope-12
+    |
+    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-8
+Tez vertex scope-33
+# Plan on vertex
+POValueOutputTez - scope-40	->	 [scope-38]
+|
+|---POShuffledValueInputTez - scope-34	<-	 [scope-31, scope-32]
+Tez vertex scope-37
+# Plan on vertex
+POValueOutputTez - scope-41	->	 [scope-38]
+|
+|---d: New For Each(false,false)[bag] - scope-24
+    |   |
+    |   Cast[int] - scope-19
+    |   |
+    |   |---Project[bytearray][0] - scope-18
+    |   |
+    |   Cast[chararray] - scope-22
+    |   |
+    |   |---Project[bytearray][1] - scope-21
+    |
+    |---d: Load(file:///tmp/input1:org.apache.pig.builtin.PigStorage) - scope-17
+Tez vertex scope-38
+# Plan on vertex
+f: Local Rearrange[tuple]{int}(false) - scope-28	->	 scope-42
+|   |
+|   Project[int][0] - scope-29
+|
+|---POShuffledValueInputTez - scope-39	<-	 [scope-37, scope-33]
+Tez vertex scope-42
+# Plan on vertex
+f: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-30
+|
+|---f: Package(Packager)[tuple]{int} - scope-27

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-10.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-10.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-10.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-10.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,70 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-53
+#--------------------------------------------------
+Tez vertex scope-37	->	Tez vertex scope-43,
+Tez vertex scope-31	->	Tez vertex scope-43,
+Tez vertex scope-32	->	Tez vertex scope-43,
+Tez vertex scope-43	->	Tez vertex scope-42,
+Tez vertex scope-42
+
+Tez vertex scope-37
+# Plan on vertex
+f: Local Rearrange[tuple]{int}(false) - scope-46	->	 scope-42
+|   |
+|   Project[int][0] - scope-47
+|
+|---d: New For Each(false,false)[bag] - scope-24
+    |   |
+    |   Cast[int] - scope-19
+    |   |
+    |   |---Project[bytearray][0] - scope-18
+    |   |
+    |   Cast[chararray] - scope-22
+    |   |
+    |   |---Project[bytearray][1] - scope-21
+    |
+    |---d: Load(file:///tmp/input1:org.apache.pig.builtin.PigStorage) - scope-17
+Tez vertex scope-31
+# Plan on vertex
+f: Local Rearrange[tuple]{int}(false) - scope-49	->	 scope-42
+|   |
+|   Project[int][0] - scope-50
+|
+|---a: New For Each(false,false)[bag] - scope-7
+    |   |
+    |   Cast[int] - scope-2
+    |   |
+    |   |---Project[bytearray][0] - scope-1
+    |   |
+    |   Cast[chararray] - scope-5
+    |   |
+    |   |---Project[bytearray][1] - scope-4
+    |
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-0
+Tez vertex scope-32
+# Plan on vertex
+f: Local Rearrange[tuple]{int}(false) - scope-51	->	 scope-42
+|   |
+|   Project[int][0] - scope-52
+|
+|---c: New For Each(false,false)[bag] - scope-15
+    |   |
+    |   Cast[int] - scope-10
+    |   |
+    |   |---Project[bytearray][1] - scope-9
+    |   |
+    |   Cast[chararray] - scope-13
+    |   |
+    |   |---Project[bytearray][0] - scope-12
+    |
+    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-8
+Tez vertex group scope-43	<-	 [scope-37, scope-31, scope-32]	->	 scope-42
+# No plan on vertex group
+Tez vertex scope-42
+# Plan on vertex
+f: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-30
+|
+|---f: Package(Packager)[tuple]{int} - scope-27

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-2-OPTOFF.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-2-OPTOFF.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-2-OPTOFF.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-2-OPTOFF.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,87 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-128
+#--------------------------------------------------
+Tez vertex scope-102	->	Tez vertex scope-104,
+Tez vertex scope-103	->	Tez vertex scope-104,
+Tez vertex scope-104	->	Tez vertex scope-108,
+Tez vertex scope-108
+
+Tez vertex scope-102
+# Plan on vertex
+POValueOutputTez - scope-106	->	 [scope-104]
+|
+|---a: New For Each(false,false)[bag] - scope-80
+    |   |
+    |   Cast[int] - scope-75
+    |   |
+    |   |---Project[bytearray][0] - scope-74
+    |   |
+    |   Cast[int] - scope-78
+    |   |
+    |   |---Project[bytearray][1] - scope-77
+    |
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-73
+Tez vertex scope-103
+# Plan on vertex
+POValueOutputTez - scope-107	->	 [scope-104]
+|
+|---c: New For Each(false,false)[bag] - scope-88
+    |   |
+    |   Cast[int] - scope-83
+    |   |
+    |   |---Project[bytearray][1] - scope-82
+    |   |
+    |   Cast[int] - scope-86
+    |   |
+    |   |---Project[bytearray][0] - scope-85
+    |
+    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-81
+Tez vertex scope-104
+# Plan on vertex
+d: Local Rearrange[tuple]{int}(false) - scope-121	->	 scope-108
+|   |
+|   Project[int][0] - scope-123
+|
+|---e: New For Each(false,false)[bag] - scope-109
+    |   |
+    |   Project[int][0] - scope-110
+    |   |
+    |   POUserFunc(org.apache.pig.builtin.AlgebraicMathBase$Initial)[tuple] - scope-111
+    |   |
+    |   |---Project[bag][1] - scope-112
+    |       |
+    |       |---Project[bag][1] - scope-113
+    |
+    |---Pre Combiner Local Rearrange[tuple]{Unknown} - scope-124
+        |
+        |---POShuffledValueInputTez - scope-105	<-	 [scope-102, scope-103]
+Tez vertex scope-108
+# Combine plan on edge <scope-104>
+d: Local Rearrange[tuple]{int}(false) - scope-125	->	 scope-108
+|   |
+|   Project[int][0] - scope-127
+|
+|---e: New For Each(false,false)[bag] - scope-114
+    |   |
+    |   Project[int][0] - scope-115
+    |   |
+    |   POUserFunc(org.apache.pig.builtin.LongSum$Intermediate)[tuple] - scope-116
+    |   |
+    |   |---Project[bag][1] - scope-117
+    |
+    |---d: Package(CombinerPackager)[tuple]{int} - scope-120
+# Plan on vertex
+e: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-101
+|
+|---e: New For Each(false,false)[bag] - scope-100
+    |   |
+    |   Project[int][0] - scope-94
+    |   |
+    |   POUserFunc(org.apache.pig.builtin.LongSum$Final)[long] - scope-98
+    |   |
+    |   |---Project[bag][1] - scope-118
+    |
+    |---d: Package(CombinerPackager)[tuple]{int} - scope-91

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-2.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-2.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-2.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-2.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,112 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-72
+#--------------------------------------------------
+Tez vertex scope-29	->	Tez vertex scope-55,
+Tez vertex scope-30	->	Tez vertex scope-55,
+Tez vertex scope-55	->	Tez vertex scope-35,
+Tez vertex scope-35
+
+Tez vertex scope-29
+# Plan on vertex
+d: Local Rearrange[tuple]{int}(false) - scope-56	->	 scope-35
+|   |
+|   Project[int][0] - scope-57
+|
+|---e: New For Each(false,false)[bag] - scope-62
+    |   |
+    |   Project[int][0] - scope-58
+    |   |
+    |   POUserFunc(org.apache.pig.builtin.AlgebraicMathBase$Initial)[tuple] - scope-59
+    |   |
+    |   |---Project[bag][1] - scope-60
+    |       |
+    |       |---Project[bag][1] - scope-61
+    |
+    |---Pre Combiner Local Rearrange[tuple]{Unknown} - scope-63
+        |
+        |---a: New For Each(false,false)[bag] - scope-7
+            |   |
+            |   Cast[int] - scope-2
+            |   |
+            |   |---Project[bytearray][0] - scope-1
+            |   |
+            |   Cast[int] - scope-5
+            |   |
+            |   |---Project[bytearray][1] - scope-4
+            |
+            |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-0
+Tez vertex scope-30
+# Plan on vertex
+d: Local Rearrange[tuple]{int}(false) - scope-64	->	 scope-35
+|   |
+|   Project[int][0] - scope-65
+|
+|---e: New For Each(false,false)[bag] - scope-70
+    |   |
+    |   Project[int][0] - scope-66
+    |   |
+    |   POUserFunc(org.apache.pig.builtin.AlgebraicMathBase$Initial)[tuple] - scope-67
+    |   |
+    |   |---Project[bag][1] - scope-68
+    |       |
+    |       |---Project[bag][1] - scope-69
+    |
+    |---Pre Combiner Local Rearrange[tuple]{Unknown} - scope-71
+        |
+        |---c: New For Each(false,false)[bag] - scope-15
+            |   |
+            |   Cast[int] - scope-10
+            |   |
+            |   |---Project[bytearray][1] - scope-9
+            |   |
+            |   Cast[int] - scope-13
+            |   |
+            |   |---Project[bytearray][0] - scope-12
+            |
+            |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-8
+Tez vertex group scope-55	<-	 [scope-29, scope-30]	->	 scope-35
+# No plan on vertex group
+Tez vertex scope-35
+# Combine plan on edge <scope-30>
+d: Local Rearrange[tuple]{int}(false) - scope-52	->	 scope-35
+|   |
+|   Project[int][0] - scope-54
+|
+|---e: New For Each(false,false)[bag] - scope-41
+    |   |
+    |   Project[int][0] - scope-42
+    |   |
+    |   POUserFunc(org.apache.pig.builtin.LongSum$Intermediate)[tuple] - scope-43
+    |   |
+    |   |---Project[bag][1] - scope-44
+    |
+    |---d: Package(CombinerPackager)[tuple]{int} - scope-47
+# Combine plan on edge <scope-29>
+d: Local Rearrange[tuple]{int}(false) - scope-52	->	 scope-35
+|   |
+|   Project[int][0] - scope-54
+|
+|---e: New For Each(false,false)[bag] - scope-41
+    |   |
+    |   Project[int][0] - scope-42
+    |   |
+    |   POUserFunc(org.apache.pig.builtin.LongSum$Intermediate)[tuple] - scope-43
+    |   |
+    |   |---Project[bag][1] - scope-44
+    |
+    |---d: Package(CombinerPackager)[tuple]{int} - scope-47
+# Plan on vertex
+e: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-28
+|
+|---e: New For Each(false,false)[bag] - scope-27
+    |   |
+    |   Project[int][0] - scope-21
+    |   |
+    |   POUserFunc(org.apache.pig.builtin.LongSum$Final)[long] - scope-25
+    |   |
+    |   |---Project[bag][1] - scope-45
+    |
+    |---d: Package(CombinerPackager)[tuple]{int} - scope-18

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-3-OPTOFF.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-3-OPTOFF.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-3-OPTOFF.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-3-OPTOFF.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,77 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-96
+#--------------------------------------------------
+Tez vertex scope-88	->	Tez vertex scope-90,
+Tez vertex scope-89	->	Tez vertex scope-90,
+Tez vertex scope-90	->	Tez vertex scope-95,
+Tez vertex scope-94	->	Tez vertex scope-95,
+Tez vertex scope-95
+
+Tez vertex scope-88
+# Plan on vertex
+POValueOutputTez - scope-92	->	 [scope-90]
+|
+|---a: New For Each(false,false)[bag] - scope-58
+    |   |
+    |   Cast[int] - scope-53
+    |   |
+    |   |---Project[bytearray][0] - scope-52
+    |   |
+    |   Cast[chararray] - scope-56
+    |   |
+    |   |---Project[bytearray][1] - scope-55
+    |
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-51
+Tez vertex scope-89
+# Plan on vertex
+POValueOutputTez - scope-93	->	 [scope-90]
+|
+|---c: New For Each(false,false)[bag] - scope-66
+    |   |
+    |   Cast[int] - scope-61
+    |   |
+    |   |---Project[bytearray][1] - scope-60
+    |   |
+    |   Cast[chararray] - scope-64
+    |   |
+    |   |---Project[bytearray][0] - scope-63
+    |
+    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-59
+Tez vertex scope-90
+# Plan on vertex
+e: Local Rearrange[tuple]{int}(false) - scope-80	->	 scope-95
+|   |
+|   Project[int][0] - scope-81
+|
+|---POShuffledValueInputTez - scope-91	<-	 [scope-88, scope-89]
+Tez vertex scope-94
+# Plan on vertex
+e: Local Rearrange[tuple]{int}(false) - scope-82	->	 scope-95
+|   |
+|   Project[int][0] - scope-83
+|
+|---d: New For Each(false,false)[bag] - scope-75
+    |   |
+    |   Cast[int] - scope-70
+    |   |
+    |   |---Project[bytearray][0] - scope-69
+    |   |
+    |   Cast[chararray] - scope-73
+    |   |
+    |   |---Project[bytearray][1] - scope-72
+    |
+    |---d: Load(file:///tmp/input1:org.apache.pig.builtin.PigStorage) - scope-68
+Tez vertex scope-95
+# Plan on vertex
+e: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-87
+|
+|---e: New For Each(true,true)[tuple] - scope-86
+    |   |
+    |   Project[bag][1] - scope-84
+    |   |
+    |   Project[bag][2] - scope-85
+    |
+    |---e: Package(Packager)[tuple]{int} - scope-79

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-3.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-3.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-3.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-3.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,76 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-50
+#--------------------------------------------------
+Tez vertex scope-43	->	Tez vertex scope-44,
+Tez vertex scope-37	->	Tez vertex scope-45,
+Tez vertex scope-38	->	Tez vertex scope-45,
+Tez vertex scope-45	->	Tez vertex scope-44,
+Tez vertex scope-44
+
+Tez vertex scope-43
+# Plan on vertex
+e: Local Rearrange[tuple]{int}(false) - scope-31	->	 scope-44
+|   |
+|   Project[int][0] - scope-32
+|
+|---d: New For Each(false,false)[bag] - scope-24
+    |   |
+    |   Cast[int] - scope-19
+    |   |
+    |   |---Project[bytearray][0] - scope-18
+    |   |
+    |   Cast[chararray] - scope-22
+    |   |
+    |   |---Project[bytearray][1] - scope-21
+    |
+    |---d: Load(file:///tmp/input1:org.apache.pig.builtin.PigStorage) - scope-17
+Tez vertex scope-37
+# Plan on vertex
+e: Local Rearrange[tuple]{int}(false) - scope-46	->	 scope-44
+|   |
+|   Project[int][0] - scope-47
+|
+|---a: New For Each(false,false)[bag] - scope-7
+    |   |
+    |   Cast[int] - scope-2
+    |   |
+    |   |---Project[bytearray][0] - scope-1
+    |   |
+    |   Cast[chararray] - scope-5
+    |   |
+    |   |---Project[bytearray][1] - scope-4
+    |
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-0
+Tez vertex scope-38
+# Plan on vertex
+e: Local Rearrange[tuple]{int}(false) - scope-48	->	 scope-44
+|   |
+|   Project[int][0] - scope-49
+|
+|---c: New For Each(false,false)[bag] - scope-15
+    |   |
+    |   Cast[int] - scope-10
+    |   |
+    |   |---Project[bytearray][1] - scope-9
+    |   |
+    |   Cast[chararray] - scope-13
+    |   |
+    |   |---Project[bytearray][0] - scope-12
+    |
+    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-8
+Tez vertex group scope-45	<-	 [scope-37, scope-38]	->	 scope-44
+# No plan on vertex group
+Tez vertex scope-44
+# Plan on vertex
+e: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-36
+|
+|---e: New For Each(true,true)[tuple] - scope-35
+    |   |
+    |   Project[bag][1] - scope-33
+    |   |
+    |   Project[bag][2] - scope-34
+    |
+    |---e: Package(Packager)[tuple]{int} - scope-28

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-4-OPTOFF.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-4-OPTOFF.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-4-OPTOFF.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-4-OPTOFF.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,69 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-83
+#--------------------------------------------------
+Tez vertex scope-76	->	Tez vertex scope-78,
+Tez vertex scope-77	->	Tez vertex scope-78,
+Tez vertex scope-82	->	Tez vertex scope-78,
+Tez vertex scope-78
+
+Tez vertex scope-76
+# Plan on vertex
+POValueOutputTez - scope-80	->	 [scope-78]
+|
+|---a: New For Each(false,false)[bag] - scope-49
+    |   |
+    |   Cast[int] - scope-44
+    |   |
+    |   |---Project[bytearray][0] - scope-43
+    |   |
+    |   Cast[chararray] - scope-47
+    |   |
+    |   |---Project[bytearray][1] - scope-46
+    |
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-42
+Tez vertex scope-77
+# Plan on vertex
+POValueOutputTez - scope-81	->	 [scope-78]
+|
+|---c: New For Each(false,false)[bag] - scope-57
+    |   |
+    |   Cast[int] - scope-52
+    |   |
+    |   |---Project[bytearray][1] - scope-51
+    |   |
+    |   Cast[chararray] - scope-55
+    |   |
+    |   |---Project[bytearray][0] - scope-54
+    |
+    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-50
+Tez vertex scope-82
+# Plan on vertex
+Local Rearrange[tuple]{int}(false) - scope-72	->	 scope-78
+|   |
+|   Project[int][0] - scope-68
+|
+|---d: New For Each(false,false)[bag] - scope-66
+    |   |
+    |   Cast[int] - scope-61
+    |   |
+    |   |---Project[bytearray][0] - scope-60
+    |   |
+    |   Cast[chararray] - scope-64
+    |   |
+    |   |---Project[bytearray][1] - scope-63
+    |
+    |---d: Load(file:///tmp/input1:org.apache.pig.builtin.PigStorage) - scope-59
+Tez vertex scope-78
+# Plan on vertex
+e: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-75
+|
+|---e: FRJoin[tuple] - scope-69	<-	 scope-82
+    |   |
+    |   Project[int][0] - scope-67
+    |   |
+    |   Project[int][0] - scope-68
+    |
+    |---POShuffledValueInputTez - scope-79	<-	 [scope-77, scope-76]

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-4.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-4.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-4.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-4.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,69 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-41
+#--------------------------------------------------
+Tez vertex scope-34	->	Tez vertex scope-36,
+Tez vertex scope-35	->	Tez vertex scope-36,
+Tez vertex scope-40	->	Tez vertex scope-36,
+Tez vertex scope-36
+
+Tez vertex scope-34
+# Plan on vertex
+POValueOutputTez - scope-38	->	 [scope-36]
+|
+|---a: New For Each(false,false)[bag] - scope-7
+    |   |
+    |   Cast[int] - scope-2
+    |   |
+    |   |---Project[bytearray][0] - scope-1
+    |   |
+    |   Cast[chararray] - scope-5
+    |   |
+    |   |---Project[bytearray][1] - scope-4
+    |
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-0
+Tez vertex scope-35
+# Plan on vertex
+POValueOutputTez - scope-39	->	 [scope-36]
+|
+|---c: New For Each(false,false)[bag] - scope-15
+    |   |
+    |   Cast[int] - scope-10
+    |   |
+    |   |---Project[bytearray][1] - scope-9
+    |   |
+    |   Cast[chararray] - scope-13
+    |   |
+    |   |---Project[bytearray][0] - scope-12
+    |
+    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-8
+Tez vertex scope-40
+# Plan on vertex
+Local Rearrange[tuple]{int}(false) - scope-30	->	 scope-36
+|   |
+|   Project[int][0] - scope-26
+|
+|---d: New For Each(false,false)[bag] - scope-24
+    |   |
+    |   Cast[int] - scope-19
+    |   |
+    |   |---Project[bytearray][0] - scope-18
+    |   |
+    |   Cast[chararray] - scope-22
+    |   |
+    |   |---Project[bytearray][1] - scope-21
+    |
+    |---d: Load(file:///tmp/input1:org.apache.pig.builtin.PigStorage) - scope-17
+Tez vertex scope-36
+# Plan on vertex
+e: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-33
+|
+|---e: FRJoin[tuple] - scope-27	<-	 scope-40
+    |   |
+    |   Project[int][0] - scope-25
+    |   |
+    |   Project[int][0] - scope-26
+    |
+    |---POShuffledValueInputTez - scope-37	<-	 [scope-34, scope-35]

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-5-OPTOFF.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-5-OPTOFF.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-5-OPTOFF.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-5-OPTOFF.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,69 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-172
+#--------------------------------------------------
+Tez vertex scope-166	->	Tez vertex scope-168,
+Tez vertex scope-167	->	Tez vertex scope-168,
+Tez vertex scope-168	->	Tez vertex scope-165,
+Tez vertex scope-165
+
+Tez vertex scope-166
+# Plan on vertex
+POValueOutputTez - scope-170	->	 [scope-168]
+|
+|---a: New For Each(false,false)[bag] - scope-146
+    |   |
+    |   Cast[int] - scope-141
+    |   |
+    |   |---Project[bytearray][0] - scope-140
+    |   |
+    |   Cast[chararray] - scope-144
+    |   |
+    |   |---Project[bytearray][1] - scope-143
+    |
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-139
+Tez vertex scope-167
+# Plan on vertex
+POValueOutputTez - scope-171	->	 [scope-168]
+|
+|---c: New For Each(false,false)[bag] - scope-154
+    |   |
+    |   Cast[int] - scope-149
+    |   |
+    |   |---Project[bytearray][1] - scope-148
+    |   |
+    |   Cast[chararray] - scope-152
+    |   |
+    |   |---Project[bytearray][0] - scope-151
+    |
+    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-147
+Tez vertex scope-168
+# Plan on vertex
+Local Rearrange[tuple]{int}(false) - scope-161	->	 scope-165
+|   |
+|   Project[int][0] - scope-157
+|
+|---POShuffledValueInputTez - scope-169	<-	 [scope-166, scope-167]
+Tez vertex scope-165
+# Plan on vertex
+e: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-164
+|
+|---e: FRJoin[tuple] - scope-158	<-	 scope-168
+    |   |
+    |   Project[int][0] - scope-156
+    |   |
+    |   Project[int][0] - scope-157
+    |
+    |---d: New For Each(false,false)[bag] - scope-138
+        |   |
+        |   Cast[int] - scope-133
+        |   |
+        |   |---Project[bytearray][0] - scope-132
+        |   |
+        |   Cast[chararray] - scope-136
+        |   |
+        |   |---Project[bytearray][1] - scope-135
+        |
+        |---d: Load(file:///tmp/input1:org.apache.pig.builtin.PigStorage) - scope-131

Added: pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-5.gld
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-5.gld?rev=1598702&view=auto
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-5.gld (added)
+++ pig/trunk/test/org/apache/pig/test/data/GoldenFiles/tez/TEZC-Union-5.gld Fri May 30 19:07:23 2014
@@ -0,0 +1,68 @@
+#--------------------------------------------------
+# There are 1 DAGs in the session
+#--------------------------------------------------
+#--------------------------------------------------
+# TEZ DAG plan: scope-130
+#--------------------------------------------------
+Tez vertex scope-119	->	Tez vertex scope-125,
+Tez vertex scope-120	->	Tez vertex scope-125,
+Tez vertex scope-125	->	Tez vertex scope-118,
+Tez vertex scope-118
+
+Tez vertex scope-119
+# Plan on vertex
+Local Rearrange[tuple]{int}(false) - scope-126	->	 scope-118
+|   |
+|   Project[int][0] - scope-127
+|
+|---a: New For Each(false,false)[bag] - scope-99
+    |   |
+    |   Cast[int] - scope-94
+    |   |
+    |   |---Project[bytearray][0] - scope-93
+    |   |
+    |   Cast[chararray] - scope-97
+    |   |
+    |   |---Project[bytearray][1] - scope-96
+    |
+    |---a: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-92
+Tez vertex scope-120
+# Plan on vertex
+Local Rearrange[tuple]{int}(false) - scope-128	->	 scope-118
+|   |
+|   Project[int][0] - scope-129
+|
+|---c: New For Each(false,false)[bag] - scope-107
+    |   |
+    |   Cast[int] - scope-102
+    |   |
+    |   |---Project[bytearray][1] - scope-101
+    |   |
+    |   Cast[chararray] - scope-105
+    |   |
+    |   |---Project[bytearray][0] - scope-104
+    |
+    |---b: Load(file:///tmp/input:org.apache.pig.builtin.PigStorage) - scope-100
+Tez vertex group scope-125	<-	 [scope-119, scope-120]	->	 scope-118
+# No plan on vertex group
+Tez vertex scope-118
+# Plan on vertex
+e: Store(file:///tmp/output:org.apache.pig.builtin.PigStorage) - scope-117
+|
+|---e: FRJoin[tuple] - scope-111	<-	 scope-125
+    |   |
+    |   Project[int][0] - scope-109
+    |   |
+    |   Project[int][0] - scope-110
+    |
+    |---d: New For Each(false,false)[bag] - scope-91
+        |   |
+        |   Cast[int] - scope-86
+        |   |
+        |   |---Project[bytearray][0] - scope-85
+        |   |
+        |   Cast[chararray] - scope-89
+        |   |
+        |   |---Project[bytearray][1] - scope-88
+        |
+        |---d: Load(file:///tmp/input1:org.apache.pig.builtin.PigStorage) - scope-84