hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jxi...@apache.org
Subject hive git commit: HIVE-10757 Explain query plan should have operation name EXPLAIN (Jimmy, reviewed by Chao)
Date Thu, 21 May 2015 16:01:16 GMT
Repository: hive
Updated Branches:
  refs/heads/master 4eed1add2 -> 5281326d9


HIVE-10757 Explain query plan should have operation name EXPLAIN (Jimmy, reviewed by Chao)


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

Branch: refs/heads/master
Commit: 5281326d97291c003c85d3748447bd33873786d5
Parents: 4eed1ad
Author: Jimmy Xiang <jxiang@cloudera.com>
Authored: Tue May 19 14:01:51 2015 -0700
Committer: Jimmy Xiang <jxiang@cloudera.com>
Committed: Thu May 21 08:57:31 2015 -0700

----------------------------------------------------------------------
 ql/src/java/org/apache/hadoop/hive/ql/Driver.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/5281326d/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/Driver.java b/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
index f046c65..5dac29f 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
@@ -443,8 +443,10 @@ public class Driver implements CommandProcessor {
       // to avoid returning sensitive data
       String queryStr = HookUtils.redactLogString(conf, command);
 
+      String operationName = ctx.getExplain() ?
+        HiveOperation.EXPLAIN.getOperationName() : SessionState.get().getCommandType();
       plan = new QueryPlan(queryStr, sem, perfLogger.getStartTime(PerfLogger.DRIVER_RUN),
queryId,
-          SessionState.get().getCommandType());
+        operationName);
 
       conf.setVar(HiveConf.ConfVars.HIVEQUERYSTRING, queryStr);
 


Mime
View raw message