hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject [36/50] [abbrv] hive git commit: HIVE-16018: Add more information for DynamicPartitionPruningOptimization (Pengcheng Xiong, reviewed by Ashutosh Chauhan)
Date Tue, 28 Mar 2017 22:32:04 GMT
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/127deb2b
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/127deb2b
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/127deb2b

Branch: refs/heads/branch-2.2
Commit: 127deb2b38183ad38f32dc1b2575e18877a12206
Parents: e27199b
Author: Pengcheng Xiong <pxiong@apache.org>
Authored: Sat Feb 25 12:52:20 2017 -0800
Committer: Owen O'Malley <omalley@apache.org>
Committed: Tue Mar 28 15:27:54 2017 -0700

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


http://git-wip-us.apache.org/repos/asf/hive/blob/127deb2b/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