Index: ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezProcContext.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezProcContext.java (revision 1602326) +++ ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezProcContext.java (working copy) @@ -19,8 +19,8 @@ package org.apache.hadoop.hive.ql.parse; import java.io.Serializable; -import java.util.HashMap; -import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -147,24 +147,24 @@ this.outputs = outputs; this.currentTask = (TezTask) TaskFactory.get( new TezWork(conf.getVar(HiveConf.ConfVars.HIVEQUERYID)), conf); - this.leafOperatorToFollowingWork = new HashMap, BaseWork>(); - this.linkOpWithWorkMap = new HashMap, Map>(); - this.linkWorkWithReduceSinkMap = new HashMap>(); - this.mapJoinWorkMap = new HashMap>(); - this.rootToWorkMap = new HashMap, BaseWork>(); - this.childToWorkMap = new HashMap, List>(); - this.mapJoinParentMap = new HashMap>>(); - this.currentMapJoinOperators = new HashSet(); - this.linkChildOpWithDummyOp = new HashMap, List>>(); + this.leafOperatorToFollowingWork = new LinkedHashMap, BaseWork>(); + this.linkOpWithWorkMap = new LinkedHashMap, Map>(); + this.linkWorkWithReduceSinkMap = new LinkedHashMap>(); + this.mapJoinWorkMap = new LinkedHashMap>(); + this.rootToWorkMap = new LinkedHashMap, BaseWork>(); + this.childToWorkMap = new LinkedHashMap, List>(); + this.mapJoinParentMap = new LinkedHashMap>>(); + this.currentMapJoinOperators = new LinkedHashSet(); + this.linkChildOpWithDummyOp = new LinkedHashMap, List>>(); this.dependencyTask = (DependencyCollectionTask) TaskFactory.get(new DependencyCollectionWork(), conf); - this.unionWorkMap = new HashMap, BaseWork>(); + this.unionWorkMap = new LinkedHashMap, BaseWork>(); this.currentUnionOperators = new LinkedList(); - this.workWithUnionOperators = new HashSet(); - this.clonedReduceSinks = new HashSet(); - this.linkedFileSinks = new HashMap>(); - this.fileSinkSet = new HashSet(); - this.connectedReduceSinks = new HashSet(); + this.workWithUnionOperators = new LinkedHashSet(); + this.clonedReduceSinks = new LinkedHashSet(); + this.linkedFileSinks = new LinkedHashMap>(); + this.fileSinkSet = new LinkedHashSet(); + this.connectedReduceSinks = new LinkedHashSet(); rootTasks.add(currentTask); } Index: ql/src/test/results/clientpositive/tez/tez_dml.q.out =================================================================== --- ql/src/test/results/clientpositive/tez/tez_dml.q.out (revision 1602326) +++ ql/src/test/results/clientpositive/tez/tez_dml.q.out (working copy) @@ -861,10 +861,10 @@ STAGE DEPENDENCIES: Stage-2 is a root stage Stage-3 depends on stages: Stage-2 + Stage-0 depends on stages: Stage-3 + Stage-4 depends on stages: Stage-0 Stage-1 depends on stages: Stage-3 - Stage-4 depends on stages: Stage-1 - Stage-0 depends on stages: Stage-3 - Stage-5 depends on stages: Stage-0 + Stage-5 depends on stages: Stage-1 STAGE PLANS: Stage: Stage-2 @@ -910,7 +910,7 @@ Stage: Stage-3 Dependency Collection - Stage: Stage-1 + Stage: Stage-0 Move Operator tables: replace: false @@ -918,12 +918,12 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - name: default.odd + name: default.even Stage: Stage-4 Stats-Aggr Operator - Stage: Stage-0 + Stage: Stage-1 Move Operator tables: replace: false @@ -931,7 +931,7 @@ input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - name: default.even + name: default.odd Stage: Stage-5 Stats-Aggr Operator