hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pxi...@apache.org
Subject hive git commit: HIVE-16018: Add more information for DynamicPartitionPruningOptimization (Pengcheng Xiong, reviewed by Ashutosh Chauhan)
Date Sat, 25 Feb 2017 20:52:30 GMT
Repository: hive
Updated Branches:
  refs/heads/master 2aa054a4d -> e0203eb48


HIVE-16018: Add more information for DynamicPartitionPruningOptimization (Pengcheng Xiong,
reviewed by Ashutosh Chauhan)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/e0203eb4
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/e0203eb4
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/e0203eb4

Branch: refs/heads/master
Commit: e0203eb489d2ebc7b08c4c8fa150ad54ff659b07
Parents: 2aa054a
Author: Pengcheng Xiong <pxiong@apache.org>
Authored: Sat Feb 25 12:52:20 2017 -0800
Committer: Pengcheng Xiong <pxiong@apache.org>
Committed: Sat Feb 25 12:52:20 2017 -0800

----------------------------------------------------------------------
 .../DynamicPartitionPruningOptimization.java        | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/e0203eb4/ql/src/java/org/apache/hadoop/hive/ql/optimizer/DynamicPartitionPruningOptimization.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/DynamicPartitionPruningOptimization.java
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/DynamicPartitionPruningOptimization.java
index 8692c45..3085f5d 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/DynamicPartitionPruningOptimization.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/DynamicPartitionPruningOptimization.java
@@ -585,6 +585,14 @@ public class DynamicPartitionPruningOptimization implements NodeProcessor
{
             groupByDescFinal, new RowSchema(rsOp.getSchema()), rsOp);
     groupByOpFinal.setColumnExprMap(new HashMap<String, ExprNodeDesc>());
 
+    // for explain purpose
+    if (parseContext.getContext().getExplainConfig() != null
+        && parseContext.getContext().getExplainConfig().isFormatted()) {
+      List<String> outputOperators = new ArrayList<>();
+      outputOperators.add(groupByOpFinal.getOperatorId());
+      rsOp.getConf().setOutputOperators(outputOperators);
+    }
+
     // Create the final Reduce Sink Operator
     ReduceSinkDesc rsDescFinal = PlanUtils.getReduceSinkDesc(
             new ArrayList<ExprNodeDesc>(), rsValueCols, gbOutputNames, false,
@@ -596,6 +604,14 @@ public class DynamicPartitionPruningOptimization implements NodeProcessor
{
     LOG.debug("DynamicMinMaxPushdown: Saving RS to TS mapping: " + rsOpFinal + ": " + ts);
     parseContext.getRsOpToTsOpMap().put(rsOpFinal, ts);
 
+    // for explain purpose
+    if (parseContext.getContext().getExplainConfig() != null
+        && parseContext.getContext().getExplainConfig().isFormatted()) {
+      List<String> outputOperators = new ArrayList<>();
+      outputOperators.add(ts.getOperatorId());
+      rsOpFinal.getConf().setOutputOperators(outputOperators);
+    }
+
     // Save the info that is required at query time to resolve dynamic/runtime values.
     RuntimeValuesInfo runtimeValuesInfo = new RuntimeValuesInfo();
     TableDesc rsFinalTableDesc = PlanUtils.getReduceValueTableDesc(


Mime
View raw message