diff --git ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveRelFieldTrimmer.java ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveRelFieldTrimmer.java new file mode 100644 index 0000000..3d1a309 --- /dev/null +++ ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveRelFieldTrimmer.java @@ -0,0 +1,75 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hive.ql.optimizer.calcite.rules; + +import java.util.Set; + +import org.apache.calcite.rel.RelCollation; +import org.apache.calcite.rel.RelFieldCollation; +import org.apache.calcite.rel.RelNode; +import org.apache.calcite.rel.core.RelFactories; +import org.apache.calcite.rel.metadata.RelMetadataQuery; +import org.apache.calcite.rel.type.RelDataTypeField; +import org.apache.calcite.sql.validate.SqlValidator; +import org.apache.calcite.sql2rel.RelFieldTrimmer; +import org.apache.calcite.util.ImmutableBitSet; +import org.apache.calcite.util.Util; + +import com.google.common.collect.ImmutableList; + +public class HiveRelFieldTrimmer extends RelFieldTrimmer { + + public HiveRelFieldTrimmer(SqlValidator validator) { + super(validator); + } + + public HiveRelFieldTrimmer(SqlValidator validator, + RelFactories.ProjectFactory projectFactory, + RelFactories.FilterFactory filterFactory, + RelFactories.JoinFactory joinFactory, + RelFactories.SemiJoinFactory semiJoinFactory, + RelFactories.SortFactory sortFactory, + RelFactories.AggregateFactory aggregateFactory, + RelFactories.SetOpFactory setOpFactory) { + super(validator, projectFactory, filterFactory, joinFactory, + semiJoinFactory, sortFactory, aggregateFactory, setOpFactory); + } + + protected TrimResult trimChild( + RelNode rel, + RelNode input, + ImmutableBitSet fieldsUsed, + Set extraFields) { + Util.discard(rel); + if (input.getClass().getName().endsWith("MedMdrClassExtentRel")) { + // MedMdrJoinRule cannot handle Join of Project of + // MedMdrClassExtentRel, only naked MedMdrClassExtentRel. + // So, disable trimming. + fieldsUsed = ImmutableBitSet.range(input.getRowType().getFieldCount()); + } + final ImmutableList collations = + RelMetadataQuery.collations(input); + for (RelCollation collation : collations) { + for (RelFieldCollation fieldCollation : collation.getFieldCollations()) { + fieldsUsed = fieldsUsed.set(fieldCollation.getFieldIndex()); + } + } + return dispatchTrimFields(input, fieldsUsed, extraFields); + } + +} diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java index 4760a22..684feb1 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java @@ -99,7 +99,6 @@ import org.apache.calcite.sql.SqlWindow; import org.apache.calcite.sql.parser.SqlParserPos; import org.apache.calcite.sql.type.SqlTypeName; -import org.apache.calcite.sql2rel.RelFieldTrimmer; import org.apache.calcite.tools.Frameworks; import org.apache.calcite.util.CompositeList; import org.apache.calcite.util.ImmutableBitSet; @@ -145,6 +144,7 @@ import org.apache.hadoop.hive.ql.optimizer.calcite.rules.HiveJoinAddNotNullRule; import org.apache.hadoop.hive.ql.optimizer.calcite.rules.HiveJoinToMultiJoinRule; import org.apache.hadoop.hive.ql.optimizer.calcite.rules.HivePartitionPruneRule; +import org.apache.hadoop.hive.ql.optimizer.calcite.rules.HiveRelFieldTrimmer; import org.apache.hadoop.hive.ql.optimizer.calcite.rules.HiveWindowingFixRule; import org.apache.hadoop.hive.ql.optimizer.calcite.translator.ASTConverter; import org.apache.hadoop.hive.ql.optimizer.calcite.translator.HiveOpConverter; @@ -951,7 +951,7 @@ private RelNode applyPreJoinOrderingTransforms(RelNode basePlan, RelMetadataProv new HivePartitionPruneRule(conf)); // 5. Projection Pruning - RelFieldTrimmer fieldTrimmer = new RelFieldTrimmer(null, HiveProject.DEFAULT_PROJECT_FACTORY, + HiveRelFieldTrimmer fieldTrimmer = new HiveRelFieldTrimmer(null, HiveProject.DEFAULT_PROJECT_FACTORY, HiveFilter.DEFAULT_FILTER_FACTORY, HiveJoin.HIVE_JOIN_FACTORY, RelFactories.DEFAULT_SEMI_JOIN_FACTORY, HiveSort.HIVE_SORT_REL_FACTORY, HiveAggregate.HIVE_AGGR_REL_FACTORY, HiveUnion.UNION_REL_FACTORY); diff --git ql/src/test/results/clientpositive/subquery_notexists.q.out ql/src/test/results/clientpositive/subquery_notexists.q.out index d745d71..81b4137 100644 --- ql/src/test/results/clientpositive/subquery_notexists.q.out +++ ql/src/test/results/clientpositive/subquery_notexists.q.out @@ -279,7 +279,7 @@ STAGE PLANS: Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col1 (type: string) - outputColumnNames: _col0 + outputColumnNames: _col1 Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false @@ -306,9 +306,9 @@ STAGE PLANS: value expressions: _col0 (type: string) TableScan Reduce Output Operator - key expressions: _col0 (type: string) + key expressions: _col1 (type: string) sort order: + - Map-reduce partition columns: _col0 (type: string) + Map-reduce partition columns: _col1 (type: string) Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE Reduce Operator Tree: Join Operator @@ -316,11 +316,11 @@ STAGE PLANS: Left Outer Join0 to 1 keys: 0 _col1 (type: string) - 1 _col0 (type: string) - outputColumnNames: _col0, _col1, _col2 + 1 _col1 (type: string) + outputColumnNames: _col0, _col1, _col3 Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: _col2 is null (type: boolean) + predicate: _col3 is null (type: boolean) Statistics: Num rows: 275 Data size: 2921 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: string), _col1 (type: string) diff --git ql/src/test/results/clientpositive/subquery_notexists_having.q.out ql/src/test/results/clientpositive/subquery_notexists_having.q.out index 40f9c93..fd09901 100644 --- ql/src/test/results/clientpositive/subquery_notexists_having.q.out +++ ql/src/test/results/clientpositive/subquery_notexists_having.q.out @@ -223,9 +223,9 @@ STAGE PLANS: value expressions: _col0 (type: string) TableScan Reduce Output Operator - key expressions: _col0 (type: string) + key expressions: _col1 (type: string) sort order: + - Map-reduce partition columns: _col0 (type: string) + Map-reduce partition columns: _col1 (type: string) Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE Reduce Operator Tree: Join Operator @@ -233,11 +233,11 @@ STAGE PLANS: Left Outer Join0 to 1 keys: 0 _col1 (type: string) - 1 _col0 (type: string) - outputColumnNames: _col0, _col1, _col2 + 1 _col1 (type: string) + outputColumnNames: _col0, _col1, _col3 Statistics: Num rows: 275 Data size: 2921 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: _col2 is null (type: boolean) + predicate: _col3 is null (type: boolean) Statistics: Num rows: 137 Data size: 1455 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: string), _col1 (type: string) @@ -282,7 +282,7 @@ STAGE PLANS: Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col1 (type: string) - outputColumnNames: _col0 + outputColumnNames: _col1 Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false diff --git ql/src/test/results/clientpositive/tez/explainuser_1.q.out ql/src/test/results/clientpositive/tez/explainuser_1.q.out index b684858..01e0714 100644 --- ql/src/test/results/clientpositive/tez/explainuser_1.q.out +++ ql/src/test/results/clientpositive/tez/explainuser_1.q.out @@ -2983,12 +2983,12 @@ Stage-0 outputColumnNames:["_col0","_col1"] Statistics:Num rows: 0 Data size: 0 Basic stats: NONE Column stats: COMPLETE Filter Operator [FIL_18] - predicate:_col2 is null (type: boolean) + predicate:_col3 is null (type: boolean) Statistics:Num rows: 0 Data size: 0 Basic stats: NONE Column stats: COMPLETE Merge Join Operator [MERGEJOIN_20] | condition map:[{"":"Left Outer Join0 to 1"}] - | keys:{"1":"_col0 (type: string)","0":"_col1 (type: string)"} - | outputColumnNames:["_col0","_col1","_col2"] + | keys:{"1":"_col1 (type: string)","0":"_col1 (type: string)"} + | outputColumnNames:["_col0","_col1","_col3"] | Statistics:Num rows: 193 Data size: 51917 Basic stats: COMPLETE Column stats: COMPLETE |<-Map 1 [SIMPLE_EDGE] | Reduce Output Operator [RS_11] @@ -3005,12 +3005,12 @@ Stage-0 | Statistics:Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE |<-Reducer 4 [SIMPLE_EDGE] Reduce Output Operator [RS_12] - key expressions:_col0 (type: string) - Map-reduce partition columns:_col0 (type: string) + key expressions:_col1 (type: string) + Map-reduce partition columns:_col1 (type: string) sort order:+ Statistics:Num rows: 83 Data size: 7553 Basic stats: COMPLETE Column stats: COMPLETE Select Operator [SEL_10] - outputColumnNames:["_col0"] + outputColumnNames:["_col1"] Statistics:Num rows: 83 Data size: 7553 Basic stats: COMPLETE Column stats: COMPLETE Group By Operator [GBY_9] | keys:KEY._col0 (type: string), KEY._col1 (type: string) diff --git ql/src/test/results/clientpositive/tez/explainuser_2.q.out ql/src/test/results/clientpositive/tez/explainuser_2.q.out index f84524b..b4a3f47 100644 --- ql/src/test/results/clientpositive/tez/explainuser_2.q.out +++ ql/src/test/results/clientpositive/tez/explainuser_2.q.out @@ -628,8 +628,8 @@ Stage-0 | outputColumnNames:["_col0","_col1"] | Merge Join Operator [MERGEJOIN_85] | | condition map:[{"":"Inner Join 0 to 1"}] - | | keys:{"1":"_col1 (type: string)","0":"_col0 (type: string)"} - | | outputColumnNames:["_col1","_col2"] + | | keys:{"1":"_col2 (type: string)","0":"_col0 (type: string)"} + | | outputColumnNames:["_col2","_col3"] | |<-Map 1 [SIMPLE_EDGE] | | Reduce Output Operator [RS_22] | | key expressions:_col0 (type: string) @@ -647,15 +647,15 @@ Stage-0 | | Statistics:Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE | |<-Reducer 8 [SIMPLE_EDGE] | Reduce Output Operator [RS_24] - | key expressions:_col1 (type: string) - | Map-reduce partition columns:_col1 (type: string) + | key expressions:_col2 (type: string) + | Map-reduce partition columns:_col2 (type: string) | sort order:+ | Statistics:Num rows: 144 Data size: 1509 Basic stats: COMPLETE Column stats: NONE - | value expressions:_col0 (type: string) + | value expressions:_col1 (type: string) | Merge Join Operator [MERGEJOIN_84] | | condition map:[{"":"Inner Join 0 to 1"}] - | | keys:{"1":"_col1 (type: string)","0":"_col0 (type: string)"} - | | outputColumnNames:["_col0","_col1"] + | | keys:{"1":"_col1 (type: string)","0":"_col1 (type: string)"} + | | outputColumnNames:["_col1","_col2"] | | Statistics:Num rows: 144 Data size: 1509 Basic stats: COMPLETE Column stats: NONE | |<-Map 10 [SIMPLE_EDGE] | | Reduce Output Operator [RS_18] @@ -675,12 +675,12 @@ Stage-0 | | Statistics:Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE | |<-Reducer 7 [SIMPLE_EDGE] | Reduce Output Operator [RS_16] - | key expressions:_col0 (type: string) - | Map-reduce partition columns:_col0 (type: string) + | key expressions:_col1 (type: string) + | Map-reduce partition columns:_col1 (type: string) | sort order:+ | Statistics:Num rows: 131 Data size: 1372 Basic stats: COMPLETE Column stats: NONE | Select Operator [SEL_12] - | outputColumnNames:["_col0"] + | outputColumnNames:["_col1"] | Statistics:Num rows: 131 Data size: 1372 Basic stats: COMPLETE Column stats: NONE | Group By Operator [GBY_11] | | keys:KEY._col0 (type: string), KEY._col1 (type: string) @@ -727,8 +727,8 @@ Stage-0 outputColumnNames:["_col0","_col1"] Merge Join Operator [MERGEJOIN_87] | condition map:[{"":"Inner Join 0 to 1"}] - | keys:{"1":"_col1 (type: string)","0":"_col0 (type: string)"} - | outputColumnNames:["_col1","_col2"] + | keys:{"1":"_col2 (type: string)","0":"_col0 (type: string)"} + | outputColumnNames:["_col2","_col3"] |<-Map 11 [SIMPLE_EDGE] | Reduce Output Operator [RS_49] | key expressions:_col0 (type: string) @@ -746,15 +746,15 @@ Stage-0 | Statistics:Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE |<-Reducer 16 [SIMPLE_EDGE] Reduce Output Operator [RS_51] - key expressions:_col1 (type: string) - Map-reduce partition columns:_col1 (type: string) + key expressions:_col2 (type: string) + Map-reduce partition columns:_col2 (type: string) sort order:+ Statistics:Num rows: 144 Data size: 1509 Basic stats: COMPLETE Column stats: NONE - value expressions:_col0 (type: string) + value expressions:_col1 (type: string) Merge Join Operator [MERGEJOIN_86] | condition map:[{"":"Inner Join 0 to 1"}] - | keys:{"1":"_col1 (type: string)","0":"_col0 (type: string)"} - | outputColumnNames:["_col0","_col1"] + | keys:{"1":"_col1 (type: string)","0":"_col1 (type: string)"} + | outputColumnNames:["_col1","_col2"] | Statistics:Num rows: 144 Data size: 1509 Basic stats: COMPLETE Column stats: NONE |<-Map 18 [SIMPLE_EDGE] | Reduce Output Operator [RS_45] @@ -774,12 +774,12 @@ Stage-0 | Statistics:Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE |<-Reducer 15 [SIMPLE_EDGE] Reduce Output Operator [RS_43] - key expressions:_col0 (type: string) - Map-reduce partition columns:_col0 (type: string) + key expressions:_col1 (type: string) + Map-reduce partition columns:_col1 (type: string) sort order:+ Statistics:Num rows: 131 Data size: 1372 Basic stats: COMPLETE Column stats: NONE Select Operator [SEL_39] - outputColumnNames:["_col0"] + outputColumnNames:["_col1"] Statistics:Num rows: 131 Data size: 1372 Basic stats: COMPLETE Column stats: NONE Group By Operator [GBY_38] | keys:KEY._col0 (type: string), KEY._col1 (type: string) @@ -893,8 +893,8 @@ Stage-0 | outputColumnNames:["_col0","_col1"] | Merge Join Operator [MERGEJOIN_170] | | condition map:[{"":"Inner Join 0 to 1"}] - | | keys:{"1":"_col1 (type: string)","0":"_col0 (type: string)"} - | | outputColumnNames:["_col1","_col3"] + | | keys:{"1":"_col2 (type: string)","0":"_col0 (type: string)"} + | | outputColumnNames:["_col1","_col4"] | |<-Map 24 [SIMPLE_EDGE] | | Reduce Output Operator [RS_110] | | key expressions:_col0 (type: string) @@ -913,14 +913,14 @@ Stage-0 | | Statistics:Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE | |<-Reducer 33 [SIMPLE_EDGE] | Reduce Output Operator [RS_112] - | key expressions:_col1 (type: string) - | Map-reduce partition columns:_col1 (type: string) + | key expressions:_col2 (type: string) + | Map-reduce partition columns:_col2 (type: string) | sort order:+ | Statistics:Num rows: 242 Data size: 2565 Basic stats: COMPLETE Column stats: NONE | Merge Join Operator [MERGEJOIN_169] | | condition map:[{"":"Inner Join 0 to 1"}] - | | keys:{"1":"_col1 (type: string)","0":"_col0 (type: string)"} - | | outputColumnNames:["_col1"] + | | keys:{"1":"_col1 (type: string)","0":"_col1 (type: string)"} + | | outputColumnNames:["_col2"] | | Statistics:Num rows: 242 Data size: 2565 Basic stats: COMPLETE Column stats: NONE | |<-Map 37 [SIMPLE_EDGE] | | Reduce Output Operator [RS_106] @@ -940,12 +940,12 @@ Stage-0 | | Statistics:Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE | |<-Reducer 32 [SIMPLE_EDGE] | Reduce Output Operator [RS_104] - | key expressions:_col0 (type: string) - | Map-reduce partition columns:_col0 (type: string) + | key expressions:_col1 (type: string) + | Map-reduce partition columns:_col1 (type: string) | sort order:+ | Statistics:Num rows: 220 Data size: 2332 Basic stats: COMPLETE Column stats: NONE | Select Operator [SEL_100] - | outputColumnNames:["_col0"] + | outputColumnNames:["_col1"] | Statistics:Num rows: 220 Data size: 2332 Basic stats: COMPLETE Column stats: NONE | Group By Operator [GBY_99] | | keys:KEY._col0 (type: string), KEY._col1 (type: string) @@ -1056,8 +1056,8 @@ Stage-0 | outputColumnNames:["_col0","_col1"] | Merge Join Operator [MERGEJOIN_168] | | condition map:[{"":"Inner Join 0 to 1"}] - | | keys:{"1":"_col1 (type: string)","0":"_col0 (type: string)"} - | | outputColumnNames:["_col1","_col3"] + | | keys:{"1":"_col2 (type: string)","0":"_col0 (type: string)"} + | | outputColumnNames:["_col1","_col4"] | |<-Map 13 [SIMPLE_EDGE] | | Reduce Output Operator [RS_58] | | key expressions:_col0 (type: string) @@ -1076,14 +1076,14 @@ Stage-0 | | Statistics:Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE | |<-Reducer 20 [SIMPLE_EDGE] | Reduce Output Operator [RS_60] - | key expressions:_col1 (type: string) - | Map-reduce partition columns:_col1 (type: string) + | key expressions:_col2 (type: string) + | Map-reduce partition columns:_col2 (type: string) | sort order:+ | Statistics:Num rows: 209 Data size: 2208 Basic stats: COMPLETE Column stats: NONE | Merge Join Operator [MERGEJOIN_167] | | condition map:[{"":"Inner Join 0 to 1"}] - | | keys:{"1":"_col1 (type: string)","0":"_col0 (type: string)"} - | | outputColumnNames:["_col1"] + | | keys:{"1":"_col1 (type: string)","0":"_col1 (type: string)"} + | | outputColumnNames:["_col2"] | | Statistics:Num rows: 209 Data size: 2208 Basic stats: COMPLETE Column stats: NONE | |<-Map 23 [SIMPLE_EDGE] | | Reduce Output Operator [RS_54] @@ -1103,12 +1103,12 @@ Stage-0 | | Statistics:Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE | |<-Reducer 19 [SIMPLE_EDGE] | Reduce Output Operator [RS_52] - | key expressions:_col0 (type: string) - | Map-reduce partition columns:_col0 (type: string) + | key expressions:_col1 (type: string) + | Map-reduce partition columns:_col1 (type: string) | sort order:+ | Statistics:Num rows: 190 Data size: 2008 Basic stats: COMPLETE Column stats: NONE | Select Operator [SEL_48] - | outputColumnNames:["_col0"] + | outputColumnNames:["_col1"] | Statistics:Num rows: 190 Data size: 2008 Basic stats: COMPLETE Column stats: NONE | Group By Operator [GBY_47] | | keys:KEY._col0 (type: string), KEY._col1 (type: string) @@ -1181,8 +1181,8 @@ Stage-0 outputColumnNames:["_col0","_col1"] Merge Join Operator [MERGEJOIN_166] | condition map:[{"":"Inner Join 0 to 1"}] - | keys:{"1":"_col1 (type: string)","0":"_col0 (type: string)"} - | outputColumnNames:["_col1","_col3"] + | keys:{"1":"_col2 (type: string)","0":"_col0 (type: string)"} + | outputColumnNames:["_col1","_col4"] |<-Map 1 [SIMPLE_EDGE] | Reduce Output Operator [RS_22] | key expressions:_col0 (type: string) @@ -1201,14 +1201,14 @@ Stage-0 | Statistics:Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE |<-Reducer 10 [SIMPLE_EDGE] Reduce Output Operator [RS_24] - key expressions:_col1 (type: string) - Map-reduce partition columns:_col1 (type: string) + key expressions:_col2 (type: string) + Map-reduce partition columns:_col2 (type: string) sort order:+ Statistics:Num rows: 144 Data size: 1509 Basic stats: COMPLETE Column stats: NONE Merge Join Operator [MERGEJOIN_165] | condition map:[{"":"Inner Join 0 to 1"}] - | keys:{"1":"_col1 (type: string)","0":"_col0 (type: string)"} - | outputColumnNames:["_col1"] + | keys:{"1":"_col1 (type: string)","0":"_col1 (type: string)"} + | outputColumnNames:["_col2"] | Statistics:Num rows: 144 Data size: 1509 Basic stats: COMPLETE Column stats: NONE |<-Map 12 [SIMPLE_EDGE] | Reduce Output Operator [RS_18] @@ -1228,12 +1228,12 @@ Stage-0 | Statistics:Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE |<-Reducer 9 [SIMPLE_EDGE] Reduce Output Operator [RS_16] - key expressions:_col0 (type: string) - Map-reduce partition columns:_col0 (type: string) + key expressions:_col1 (type: string) + Map-reduce partition columns:_col1 (type: string) sort order:+ Statistics:Num rows: 131 Data size: 1372 Basic stats: COMPLETE Column stats: NONE Select Operator [SEL_12] - outputColumnNames:["_col0"] + outputColumnNames:["_col1"] Statistics:Num rows: 131 Data size: 1372 Basic stats: COMPLETE Column stats: NONE Group By Operator [GBY_11] | keys:KEY._col0 (type: string), KEY._col1 (type: string) @@ -1666,19 +1666,19 @@ Stage-0 | outputColumnNames:["_col0","_col1"] | Map Join Operator [MAPJOIN_85] | | condition map:[{"":"Inner Join 0 to 1"}] - | | keys:{"Map 1":"_col0 (type: string)","Reducer 6":"_col1 (type: string)"} - | | outputColumnNames:["_col1","_col2"] + | | keys:{"Map 1":"_col0 (type: string)","Reducer 6":"_col2 (type: string)"} + | | outputColumnNames:["_col2","_col3"] | |<-Reducer 6 [BROADCAST_EDGE] | | Reduce Output Operator [RS_24] - | | key expressions:_col1 (type: string) - | | Map-reduce partition columns:_col1 (type: string) + | | key expressions:_col2 (type: string) + | | Map-reduce partition columns:_col2 (type: string) | | sort order:+ | | Statistics:Num rows: 144 Data size: 1509 Basic stats: COMPLETE Column stats: NONE - | | value expressions:_col0 (type: string) + | | value expressions:_col1 (type: string) | | Map Join Operator [MAPJOIN_84] | | | condition map:[{"":"Inner Join 0 to 1"}] - | | | keys:{"Reducer 6":"_col0 (type: string)","Map 8":"_col1 (type: string)"} - | | | outputColumnNames:["_col0","_col1"] + | | | keys:{"Reducer 6":"_col1 (type: string)","Map 8":"_col1 (type: string)"} + | | | outputColumnNames:["_col1","_col2"] | | | Statistics:Num rows: 144 Data size: 1509 Basic stats: COMPLETE Column stats: NONE | | |<-Map 8 [BROADCAST_EDGE] | | | Reduce Output Operator [RS_18] @@ -1697,7 +1697,7 @@ Stage-0 | | | alias:x | | | Statistics:Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE | | |<-Select Operator [SEL_12] - | | outputColumnNames:["_col0"] + | | outputColumnNames:["_col1"] | | Statistics:Num rows: 131 Data size: 1372 Basic stats: COMPLETE Column stats: NONE | | Group By Operator [GBY_11] | | | keys:KEY._col0 (type: string), KEY._col1 (type: string) @@ -1750,19 +1750,19 @@ Stage-0 outputColumnNames:["_col0","_col1"] Map Join Operator [MAPJOIN_87] | condition map:[{"":"Inner Join 0 to 1"}] - | keys:{"Reducer 12":"_col1 (type: string)","Map 9":"_col0 (type: string)"} - | outputColumnNames:["_col1","_col2"] + | keys:{"Reducer 12":"_col2 (type: string)","Map 9":"_col0 (type: string)"} + | outputColumnNames:["_col2","_col3"] |<-Reducer 12 [BROADCAST_EDGE] | Reduce Output Operator [RS_51] - | key expressions:_col1 (type: string) - | Map-reduce partition columns:_col1 (type: string) + | key expressions:_col2 (type: string) + | Map-reduce partition columns:_col2 (type: string) | sort order:+ | Statistics:Num rows: 144 Data size: 1509 Basic stats: COMPLETE Column stats: NONE - | value expressions:_col0 (type: string) + | value expressions:_col1 (type: string) | Map Join Operator [MAPJOIN_86] | | condition map:[{"":"Inner Join 0 to 1"}] - | | keys:{"Map 14":"_col1 (type: string)","Reducer 12":"_col0 (type: string)"} - | | outputColumnNames:["_col0","_col1"] + | | keys:{"Map 14":"_col1 (type: string)","Reducer 12":"_col1 (type: string)"} + | | outputColumnNames:["_col1","_col2"] | | Statistics:Num rows: 144 Data size: 1509 Basic stats: COMPLETE Column stats: NONE | |<-Map 14 [BROADCAST_EDGE] | | Reduce Output Operator [RS_45] @@ -1781,7 +1781,7 @@ Stage-0 | | alias:x | | Statistics:Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE | |<-Select Operator [SEL_39] - | outputColumnNames:["_col0"] + | outputColumnNames:["_col1"] | Statistics:Num rows: 131 Data size: 1372 Basic stats: COMPLETE Column stats: NONE | Group By Operator [GBY_38] | | keys:KEY._col0 (type: string), KEY._col1 (type: string) @@ -1898,18 +1898,18 @@ Stage-0 | outputColumnNames:["_col0","_col1"] | Map Join Operator [MAPJOIN_170] | | condition map:[{"":"Inner Join 0 to 1"}] - | | keys:{"Map 20":"_col0 (type: string)","Reducer 27":"_col1 (type: string)"} - | | outputColumnNames:["_col1","_col3"] + | | keys:{"Map 20":"_col0 (type: string)","Reducer 27":"_col2 (type: string)"} + | | outputColumnNames:["_col1","_col4"] | |<-Reducer 27 [BROADCAST_EDGE] | | Reduce Output Operator [RS_112] - | | key expressions:_col1 (type: string) - | | Map-reduce partition columns:_col1 (type: string) + | | key expressions:_col2 (type: string) + | | Map-reduce partition columns:_col2 (type: string) | | sort order:+ | | Statistics:Num rows: 242 Data size: 2565 Basic stats: COMPLETE Column stats: NONE | | Map Join Operator [MAPJOIN_169] | | | condition map:[{"":"Inner Join 0 to 1"}] - | | | keys:{"Map 31":"_col1 (type: string)","Reducer 27":"_col0 (type: string)"} - | | | outputColumnNames:["_col1"] + | | | keys:{"Map 31":"_col1 (type: string)","Reducer 27":"_col1 (type: string)"} + | | | outputColumnNames:["_col2"] | | | Statistics:Num rows: 242 Data size: 2565 Basic stats: COMPLETE Column stats: NONE | | |<-Map 31 [BROADCAST_EDGE] | | | Reduce Output Operator [RS_106] @@ -1928,7 +1928,7 @@ Stage-0 | | | alias:x | | | Statistics:Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE | | |<-Select Operator [SEL_100] - | | outputColumnNames:["_col0"] + | | outputColumnNames:["_col1"] | | Statistics:Num rows: 220 Data size: 2332 Basic stats: COMPLETE Column stats: NONE | | Group By Operator [GBY_99] | | | keys:KEY._col0 (type: string), KEY._col1 (type: string) @@ -2045,18 +2045,18 @@ Stage-0 | outputColumnNames:["_col0","_col1"] | Map Join Operator [MAPJOIN_168] | | condition map:[{"":"Inner Join 0 to 1"}] - | | keys:{"Map 11":"_col0 (type: string)","Reducer 16":"_col1 (type: string)"} - | | outputColumnNames:["_col1","_col3"] + | | keys:{"Map 11":"_col0 (type: string)","Reducer 16":"_col2 (type: string)"} + | | outputColumnNames:["_col1","_col4"] | |<-Reducer 16 [BROADCAST_EDGE] | | Reduce Output Operator [RS_60] - | | key expressions:_col1 (type: string) - | | Map-reduce partition columns:_col1 (type: string) + | | key expressions:_col2 (type: string) + | | Map-reduce partition columns:_col2 (type: string) | | sort order:+ | | Statistics:Num rows: 209 Data size: 2208 Basic stats: COMPLETE Column stats: NONE | | Map Join Operator [MAPJOIN_167] | | | condition map:[{"":"Inner Join 0 to 1"}] - | | | keys:{"Map 19":"_col1 (type: string)","Reducer 16":"_col0 (type: string)"} - | | | outputColumnNames:["_col1"] + | | | keys:{"Map 19":"_col1 (type: string)","Reducer 16":"_col1 (type: string)"} + | | | outputColumnNames:["_col2"] | | | Statistics:Num rows: 209 Data size: 2208 Basic stats: COMPLETE Column stats: NONE | | |<-Map 19 [BROADCAST_EDGE] | | | Reduce Output Operator [RS_54] @@ -2075,7 +2075,7 @@ Stage-0 | | | alias:x | | | Statistics:Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE | | |<-Select Operator [SEL_48] - | | outputColumnNames:["_col0"] + | | outputColumnNames:["_col1"] | | Statistics:Num rows: 190 Data size: 2008 Basic stats: COMPLETE Column stats: NONE | | Group By Operator [GBY_47] | | | keys:KEY._col0 (type: string), KEY._col1 (type: string) @@ -2154,18 +2154,18 @@ Stage-0 outputColumnNames:["_col0","_col1"] Map Join Operator [MAPJOIN_166] | condition map:[{"":"Inner Join 0 to 1"}] - | keys:{"Map 1":"_col0 (type: string)","Reducer 8":"_col1 (type: string)"} - | outputColumnNames:["_col1","_col3"] + | keys:{"Map 1":"_col0 (type: string)","Reducer 8":"_col2 (type: string)"} + | outputColumnNames:["_col1","_col4"] |<-Reducer 8 [BROADCAST_EDGE] | Reduce Output Operator [RS_24] - | key expressions:_col1 (type: string) - | Map-reduce partition columns:_col1 (type: string) + | key expressions:_col2 (type: string) + | Map-reduce partition columns:_col2 (type: string) | sort order:+ | Statistics:Num rows: 144 Data size: 1509 Basic stats: COMPLETE Column stats: NONE | Map Join Operator [MAPJOIN_165] | | condition map:[{"":"Inner Join 0 to 1"}] - | | keys:{"Map 10":"_col1 (type: string)","Reducer 8":"_col0 (type: string)"} - | | outputColumnNames:["_col1"] + | | keys:{"Map 10":"_col1 (type: string)","Reducer 8":"_col1 (type: string)"} + | | outputColumnNames:["_col2"] | | Statistics:Num rows: 144 Data size: 1509 Basic stats: COMPLETE Column stats: NONE | |<-Map 10 [BROADCAST_EDGE] | | Reduce Output Operator [RS_18] @@ -2184,7 +2184,7 @@ Stage-0 | | alias:x | | Statistics:Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE | |<-Select Operator [SEL_12] - | outputColumnNames:["_col0"] + | outputColumnNames:["_col1"] | Statistics:Num rows: 131 Data size: 1372 Basic stats: COMPLETE Column stats: NONE | Group By Operator [GBY_11] | | keys:KEY._col0 (type: string), KEY._col1 (type: string) @@ -3187,8 +3187,8 @@ Stage-0 | | outputColumnNames:["_col0","_col1"] | | Merge Join Operator [MERGEJOIN_164] | | | condition map:[{"":"Inner Join 0 to 1"}] - | | | keys:{"1":"_col0 (type: string)","0":"_col1 (type: string)"} - | | | outputColumnNames:["_col1","_col4"] + | | | keys:{"1":"_col0 (type: string)","0":"_col2 (type: string)"} + | | | outputColumnNames:["_col2","_col5"] | | |<-Map 22 [SIMPLE_EDGE] | | | Reduce Output Operator [RS_59] | | | key expressions:_col0 (type: string) @@ -3207,14 +3207,14 @@ Stage-0 | | | Statistics:Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE | | |<-Reducer 17 [SIMPLE_EDGE] | | Reduce Output Operator [RS_57] - | | key expressions:_col1 (type: string) - | | Map-reduce partition columns:_col1 (type: string) + | | key expressions:_col2 (type: string) + | | Map-reduce partition columns:_col2 (type: string) | | sort order:+ | | Statistics:Num rows: 209 Data size: 2208 Basic stats: COMPLETE Column stats: NONE | | Merge Join Operator [MERGEJOIN_163] | | | condition map:[{"":"Inner Join 0 to 1"}] - | | | keys:{"1":"_col1 (type: string)","0":"_col0 (type: string)"} - | | | outputColumnNames:["_col1"] + | | | keys:{"1":"_col1 (type: string)","0":"_col1 (type: string)"} + | | | outputColumnNames:["_col2"] | | | Statistics:Num rows: 209 Data size: 2208 Basic stats: COMPLETE Column stats: NONE | | |<-Map 21 [SIMPLE_EDGE] | | | Reduce Output Operator [RS_54] @@ -3234,12 +3234,12 @@ Stage-0 | | | Statistics:Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE | | |<-Reducer 16 [SIMPLE_EDGE] | | Reduce Output Operator [RS_52] - | | key expressions:_col0 (type: string) - | | Map-reduce partition columns:_col0 (type: string) + | | key expressions:_col1 (type: string) + | | Map-reduce partition columns:_col1 (type: string) | | sort order:+ | | Statistics:Num rows: 190 Data size: 2008 Basic stats: COMPLETE Column stats: NONE | | Select Operator [SEL_46] - | | outputColumnNames:["_col0"] + | | outputColumnNames:["_col1"] | | Statistics:Num rows: 190 Data size: 2008 Basic stats: COMPLETE Column stats: NONE | | Group By Operator [GBY_45] | | | keys:KEY._col0 (type: string), KEY._col1 (type: string) @@ -3312,8 +3312,8 @@ Stage-0 | outputColumnNames:["_col0","_col1"] | Merge Join Operator [MERGEJOIN_162] | | condition map:[{"":"Inner Join 0 to 1"}] - | | keys:{"1":"_col1 (type: string)","0":"_col0 (type: string)"} - | | outputColumnNames:["_col1","_col3"] + | | keys:{"1":"_col2 (type: string)","0":"_col0 (type: string)"} + | | outputColumnNames:["_col1","_col4"] | |<-Map 1 [SIMPLE_EDGE] | | Reduce Output Operator [RS_22] | | key expressions:_col0 (type: string) @@ -3332,14 +3332,14 @@ Stage-0 | | Statistics:Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE | |<-Reducer 9 [SIMPLE_EDGE] | Reduce Output Operator [RS_24] - | key expressions:_col1 (type: string) - | Map-reduce partition columns:_col1 (type: string) + | key expressions:_col2 (type: string) + | Map-reduce partition columns:_col2 (type: string) | sort order:+ | Statistics:Num rows: 144 Data size: 1509 Basic stats: COMPLETE Column stats: NONE | Map Join Operator [MAPJOIN_161] | | condition map:[{"":"Inner Join 0 to 1"}] - | | keys:{"Map 11":"_col1 (type: string)","Reducer 9":"_col0 (type: string)"} - | | outputColumnNames:["_col1"] + | | keys:{"Map 11":"_col1 (type: string)","Reducer 9":"_col1 (type: string)"} + | | outputColumnNames:["_col2"] | | Statistics:Num rows: 144 Data size: 1509 Basic stats: COMPLETE Column stats: NONE | |<-Map 11 [BROADCAST_EDGE] | | Reduce Output Operator [RS_18] @@ -3358,7 +3358,7 @@ Stage-0 | | alias:x | | Statistics:Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE | |<-Select Operator [SEL_12] - | outputColumnNames:["_col0"] + | outputColumnNames:["_col1"] | Statistics:Num rows: 131 Data size: 1372 Basic stats: COMPLETE Column stats: NONE | Group By Operator [GBY_11] | | keys:KEY._col0 (type: string), KEY._col1 (type: string) @@ -3405,8 +3405,8 @@ Stage-0 outputColumnNames:["_col0","_col1"] Map Join Operator [MAPJOIN_166] | condition map:[{"":"Inner Join 0 to 1"}] - | keys:{"Map 34":"_col1 (type: string)","Reducer 29":"_col0 (type: string)"} - | outputColumnNames:["_col1","_col4"] + | keys:{"Map 34":"_col1 (type: string)","Reducer 29":"_col1 (type: string)"} + | outputColumnNames:["_col2","_col5"] |<-Map 34 [BROADCAST_EDGE] | Reduce Output Operator [RS_111] | key expressions:_col1 (type: string) @@ -3445,7 +3445,7 @@ Stage-0 | alias:x | Statistics:Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE |<-Select Operator [SEL_97] - outputColumnNames:["_col0"] + outputColumnNames:["_col1"] Group By Operator [GBY_96] | keys:KEY._col0 (type: string), KEY._col1 (type: string) | outputColumnNames:["_col0","_col1"]