HIVE-20193: cboInfo is not present in the explain plan json (Anishek Agarwal, 
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/aa3a5619
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/aa3a5619
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/aa3a5619

Branch: refs/heads/master
Commit: aa3a561934115c2b47a3f8ae614da5dde624ecf2
Parents: 8c6b5c6
Author: Anishek Agarwal <anis...@gmail.com>
Authored: Fri Aug 17 12:11:09 2018 +0530
Committer: Anishek Agarwal <anis...@gmail.com>
Committed: Fri Aug 17 12:11:09 2018 +0530

----------------------------------------------------------------------
 ql/src/java/org/apache/hadoop/hive/ql/Driver.java            | 3 ++-
 ql/src/java/org/apache/hadoop/hive/ql/QueryPlan.java         | 7 ++++++-
 ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java  | 8 ++++++--
 .../apache/hadoop/hive/ql/hooks/HiveProtoLoggingHook.java    | 2 +-
 .../apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java    | 4 ++++
 .../test/org/apache/hadoop/hive/ql/exec/TestExplainTask.java | 4 ++--
 ql/src/test/results/clientpositive/input4.q.out              | 2 +-
 ql/src/test/results/clientpositive/join0.q.out               | 2 +-
 ql/src/test/results/clientpositive/parallel_join0.q.out      | 2 +-
 ql/src/test/results/clientpositive/plan_json.q.out           | 2 +-
 ql/src/test/results/clientpositive/vector_outer_join3.q.out  | 6 +++---
 ql/src/test/results/clientpositive/vector_outer_join4.q.out  | 6 +++---
 ql/src/test/results/clientpositive/vector_outer_join6.q.out  | 4 ++--
 13 files changed, 33 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/aa3a5619/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 039f991..737debd 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
@@ -1030,7 +1030,8 @@ public class Driver implements IDriver {
     PrintStream ps = new PrintStream(baos);
     try {
       List<Task<?>> rootTasks = sem.getAllRootTasks();
-      task.getJSONPlan(ps, rootTasks, sem.getFetchTask(), false, true, true, 
plan.getOptimizedQueryString());
+      task.getJSONPlan(ps, rootTasks, sem.getFetchTask(), false, true, true, 
sem.getCboInfo(),
+          plan.getOptimizedQueryString());
       ret = baos.toString();
     } catch (Exception e) {
       LOG.warn("Exception generating explain output: " + e, e);

http://git-wip-us.apache.org/repos/asf/hive/blob/aa3a5619/ql/src/java/org/apache/hadoop/hive/ql/QueryPlan.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/QueryPlan.java 
b/ql/src/java/org/apache/hadoop/hive/ql/QueryPlan.java
index c4654d9..ac03efe 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/QueryPlan.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/QueryPlan.java
@@ -73,7 +73,7 @@ import com.google.common.annotations.VisibleForTesting;
 public class QueryPlan implements Serializable {
   private static final long serialVersionUID = 1L;
 
-
+  private String cboInfo;
   private String queryString;
   private String optimizedQueryString;
 
@@ -160,6 +160,7 @@ public class QueryPlan implements Serializable {
     this.acidSinks = sem.getAcidFileSinks();
     this.acidDdlDesc = sem.getAcidDdlDesc();
     this.acidAnalyzeTable = sem.getAcidAnalyzeTable();
+    this.cboInfo = sem.getCboInfo();
   }
 
   /**
@@ -856,4 +857,8 @@ public class QueryPlan implements Serializable {
   public Boolean getAutoCommitValue() {
     return autoCommitValue;
   }
+
+  public String getCboInfo() {
+    return cboInfo;
+  }
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/aa3a5619/ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java 
b/ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java
index f185d9d..da20d2e 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java
@@ -220,11 +220,12 @@ public class ExplainTask extends Task<ExplainWork> 
implements Serializable {
   public JSONObject getJSONPlan(PrintStream out, ExplainWork work)
       throws Exception {
     return getJSONPlan(out, work.getRootTasks(), work.getFetchTask(),
-                       work.isFormatted(), work.getExtended(), 
work.isAppendTaskType(), work.getOptimizedSQL());
+        work.isFormatted(), work.getExtended(), work.isAppendTaskType(), 
work.getCboInfo(),
+        work.getOptimizedSQL());
   }
 
   public JSONObject getJSONPlan(PrintStream out, List<Task<?>> tasks, Task<?> 
fetchTask,
-      boolean jsonOutput, boolean isExtended, boolean appendTaskType, String 
optimizedSQL) throws Exception {
+      boolean jsonOutput, boolean isExtended, boolean appendTaskType, String 
cboInfo, String optimizedSQL) throws Exception {
 
     // If the user asked for a formatted output, dump the json output
     // in the output stream
@@ -279,6 +280,9 @@ public class ExplainTask extends Task<ExplainWork> 
implements Serializable {
       }
 
       if (jsonOutput) {
+        if (cboInfo != null) {
+          outJSONObject.put("cboInfo", cboInfo);
+        }
         outJSONObject.put("STAGE DEPENDENCIES", jsonDependencies);
       }
 

http://git-wip-us.apache.org/repos/asf/hive/blob/aa3a5619/ql/src/java/org/apache/hadoop/hive/ql/hooks/HiveProtoLoggingHook.java
----------------------------------------------------------------------
diff --git 
a/ql/src/java/org/apache/hadoop/hive/ql/hooks/HiveProtoLoggingHook.java 
b/ql/src/java/org/apache/hadoop/hive/ql/hooks/HiveProtoLoggingHook.java
index 45e1ab3..8f7c53f 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/hooks/HiveProtoLoggingHook.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/hooks/HiveProtoLoggingHook.java
@@ -482,7 +482,7 @@ public class HiveProtoLoggingHook implements 
ExecuteWithHookContext {
           plan.getFetchTask(), // FetchTask
           null, // analyzer
           config, // explainConfig
-          null, // cboInfo,
+          plan.getCboInfo(), // cboInfo,
           plan.getOptimizedQueryString()
       );
       ExplainTask explain = (ExplainTask) TaskFactory.get(work, conf);

http://git-wip-us.apache.org/repos/asf/hive/blob/aa3a5619/ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java
----------------------------------------------------------------------
diff --git 
a/ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java 
b/ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java
index e3fa379..f24add3 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java
@@ -186,6 +186,10 @@ public abstract class BaseSemanticAnalyzer {
     return false;
   }
 
+  public String getCboInfo() {
+    return ctx.getCboInfo();
+  }
+
   class RowFormatParams {
     String fieldDelim = null;
     String fieldEscape = null;

http://git-wip-us.apache.org/repos/asf/hive/blob/aa3a5619/ql/src/test/org/apache/hadoop/hive/ql/exec/TestExplainTask.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/exec/TestExplainTask.java 
b/ql/src/test/org/apache/hadoop/hive/ql/exec/TestExplainTask.java
index 244bc73..a0c0413 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/exec/TestExplainTask.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/exec/TestExplainTask.java
@@ -218,8 +218,8 @@ public class TestExplainTask {
 
 
     JsonNode result = objectMapper.readTree(uut.getJSONPlan(null, tasks, null, 
true,
-            false, false, null).toString());
-    JsonNode expected = objectMapper.readTree("{\"STAGE 
DEPENDENCIES\":{\"mockTaskId\":" +
+            false, false, "Plan Optimized by CBO", null).toString());
+    JsonNode expected = objectMapper.readTree("{\"cboInfo\":\"Plan Optimized 
by CBO\", \"STAGE DEPENDENCIES\":{\"mockTaskId\":" +
             "{\"ROOT STAGE\":\"TRUE\",\"BACKUP 
STAGE\":\"backup-id-mock\"}},\"STAGE PLANS\":" +
             "{\"mockTaskId\":{}}}");
 

http://git-wip-us.apache.org/repos/asf/hive/blob/aa3a5619/ql/src/test/results/clientpositive/input4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/input4.q.out 
b/ql/src/test/results/clientpositive/input4.q.out
index ef584ac..508a02b 100644
--- a/ql/src/test/results/clientpositive/input4.q.out
+++ b/ql/src/test/results/clientpositive/input4.q.out
@@ -45,7 +45,7 @@ PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN FORMATTED
 SELECT Input4Alias.VALUE, Input4Alias.KEY FROM INPUT4_n0 AS Input4Alias
 POSTHOOK: type: QUERY
-{"optimizedSQL":"SELECT `value`, `key`\nFROM `default`.`input4_n0`","STAGE 
DEPENDENCIES":{"Stage-0":{"ROOT STAGE":"TRUE"}},"STAGE 
PLANS":{"Stage-0":{"Fetch Operator":{"limit:":"-1","Processor 
Tree:":{"TableScan":{"alias:":"input4alias","columns:":["value","key"],"database:":"default","Statistics:":"Num
 rows: 1 Data size: 58120 Basic stats: COMPLETE Column stats: 
NONE","table:":"input4_n0","isTempTable:":"false","OperatorId:":"TS_0","children":{"Select
 Operator":{"expressions:":"value (type: string), key (type: 
string)","columnExprMap:":{"_col0":"value","_col1":"key"},"outputColumnNames:":["_col0","_col1"],"Statistics:":"Num
 rows: 1 Data size: 58120 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"SEL_1","children":{"ListSink":{"OperatorId:":"LIST_SINK_3"}}}}}}}}}}
+{"optimizedSQL":"SELECT `value`, `key`\nFROM 
`default`.`input4_n0`","cboInfo":"Plan optimized by CBO.","STAGE 
DEPENDENCIES":{"Stage-0":{"ROOT STAGE":"TRUE"}},"STAGE 
PLANS":{"Stage-0":{"Fetch Operator":{"limit:":"-1","Processor 
Tree:":{"TableScan":{"alias:":"input4alias","columns:":["value","key"],"database:":"default","Statistics:":"Num
 rows: 1 Data size: 58120 Basic stats: COMPLETE Column stats: 
NONE","table:":"input4_n0","isTempTable:":"false","OperatorId:":"TS_0","children":{"Select
 Operator":{"expressions:":"value (type: string), key (type: 
string)","columnExprMap:":{"_col0":"value","_col1":"key"},"outputColumnNames:":["_col0","_col1"],"Statistics:":"Num
 rows: 1 Data size: 58120 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"SEL_1","children":{"ListSink":{"OperatorId:":"LIST_SINK_3"}}}}}}}}}}
 PREHOOK: query: SELECT Input4Alias.VALUE, Input4Alias.KEY FROM INPUT4_n0 AS 
Input4Alias
 PREHOOK: type: QUERY
 PREHOOK: Input: default@input4_n0

http://git-wip-us.apache.org/repos/asf/hive/blob/aa3a5619/ql/src/test/results/clientpositive/join0.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/join0.q.out 
b/ql/src/test/results/clientpositive/join0.q.out
index 003a990..44709bf 100644
--- a/ql/src/test/results/clientpositive/join0.q.out
+++ b/ql/src/test/results/clientpositive/join0.q.out
@@ -114,7 +114,7 @@ SELECT src1.key as k1, src1.value as v1,
   (SELECT * FROM src WHERE src.key < 10) src2
   SORT BY k1, v1, k2, v2
 POSTHOOK: type: QUERY
-{"STAGE DEPENDENCIES":{"Stage-1":{"ROOT STAGE":"TRUE"},"Stage-2":{"DEPENDENT 
STAGES":"Stage-1"},"Stage-0":{"DEPENDENT STAGES":"Stage-2"}},"STAGE 
PLANS":{"Stage-1":{"Map Reduce":{"Map Operator 
Tree:":[{"TableScan":{"alias:":"src","columns:":["key","value"],"database:":"default","filterExpr:":"(key
 < 10) (type: boolean)","Statistics:":"Num rows: 500 Data size: 5312 Basic 
stats: COMPLETE Column stats: 
NONE","table:":"src","isTempTable:":"false","OperatorId:":"TS_0","children":{"Filter
 Operator":{"predicate:":"(key < 10) (type: boolean)","Statistics:":"Num rows: 
166 Data size: 1763 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"FIL_13","children":{"Select Operator":{"expressions:":"key 
(type: string), value (type: 
string)","columnExprMap:":{"_col0":"key","_col1":"value"},"outputColumnNames:":["_col0","_col1"],"Statistics:":"Num
 rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"SEL_2","children":{"Reduce Output 
Operator":{"columnExprMap:":{"VALU
 E._col0":"_col0","VALUE._col1":"_col1"},"sort order:":"","Statistics:":"Num 
rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE","value 
expressions:":"_col0 (type: string), _col1 (type: 
string)","OperatorId:":"RS_6"}}}}}}}},{"TableScan":{"alias:":"src","columns:":["key","value"],"database:":"default","filterExpr:":"(key
 < 10) (type: boolean)","Statistics:":"Num rows: 500 Data size: 5312 Basic 
stats: COMPLETE Column stats: 
NONE","table:":"src","isTempTable:":"false","OperatorId:":"TS_3","children":{"Filter
 Operator":{"predicate:":"(key < 10) (type: boolean)","Statistics:":"Num rows: 
166 Data size: 1763 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"FIL_14","children":{"Select Operator":{"expressions:":"key 
(type: string), value (type: 
string)","columnExprMap:":{"_col0":"key","_col1":"value"},"outputColumnNames:":["_col0","_col1"],"Statistics:":"Num
 rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"SEL_5","children":{"Reduce Ou
 tput 
Operator":{"columnExprMap:":{"VALUE._col0":"_col0","VALUE._col1":"_col1"},"sort 
order:":"","Statistics:":"Num rows: 166 Data size: 1763 Basic stats: COMPLETE 
Column stats: NONE","value expressions:":"_col0 (type: string), _col1 (type: 
string)","OperatorId:":"RS_7"}}}}}}}}],"Reduce Operator Tree:":{"Join 
Operator":{"columnExprMap:":{"_col0":"0:VALUE._col0","_col1":"0:VALUE._col1","_col2":"1:VALUE._col0","_col3":"1:VALUE._col1"},"condition
 map:":[{"":"Inner Join 0 to 
1"}],"keys:":{},"outputColumnNames:":["_col0","_col1","_col2","_col3"],"Statistics:":"Num
 rows: 27556 Data size: 612872 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"JOIN_8","children":{"File Output 
Operator":{"compressed:":"false","table:":{"input 
format:":"org.apache.hadoop.mapred.SequenceFileInputFormat","output 
format:":"org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe"},"OperatorId:":"FS_15"}}}}}},"Stage-2":{"Map
 Reduce":{"Ma
 p Operator 
Tree:":[{"TableScan":{"columns:":["_col0","_col1","_col2","_col3"],"OperatorId:":"TS_16","children":{"Reduce
 Output 
Operator":{"columnExprMap:":{"KEY.reducesinkkey0":"_col0","KEY.reducesinkkey1":"_col1","KEY.reducesinkkey2":"_col2","KEY.reducesinkkey3":"_col3"},"key
 expressions:":"_col0 (type: string), _col1 (type: string), _col2 (type: 
string), _col3 (type: string)","sort order:":"++++","Statistics:":"Num rows: 
27556 Data size: 612872 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"RS_10"}}}}],"Reduce Operator Tree:":{"Select 
Operator":{"expressions:":"KEY.reducesinkkey0 (type: string), 
KEY.reducesinkkey1 (type: string), KEY.reducesinkkey2 (type: string), 
KEY.reducesinkkey3 (type: 
string)","columnExprMap:":{"_col0":"KEY.reducesinkkey0","_col1":"KEY.reducesinkkey1","_col2":"KEY.reducesinkkey2","_col3":"KEY.reducesinkkey3"},"outputColumnNames:":["_col0","_col1","_col2","_col3"],"Statistics:":"Num
 rows: 27556 Data size: 612872 Basic stats: COMPLETE Column stats: NO
 NE","OperatorId:":"SEL_11","children":{"File Output 
Operator":{"compressed:":"false","Statistics:":"Num rows: 27556 Data size: 
612872 Basic stats: COMPLETE Column stats: NONE","table:":{"input 
format:":"org.apache.hadoop.mapred.SequenceFileInputFormat","output 
format:":"org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"},"OperatorId:":"FS_12"}}}}}},"Stage-0":{"Fetch
 Operator":{"limit:":"-1","Processor 
Tree:":{"ListSink":{"OperatorId:":"LIST_SINK_17"}}}}}}
+{"cboInfo":"Plan not optimized by CBO.","STAGE DEPENDENCIES":{"Stage-1":{"ROOT 
STAGE":"TRUE"},"Stage-2":{"DEPENDENT STAGES":"Stage-1"},"Stage-0":{"DEPENDENT 
STAGES":"Stage-2"}},"STAGE PLANS":{"Stage-1":{"Map Reduce":{"Map Operator 
Tree:":[{"TableScan":{"alias:":"src","columns:":["key","value"],"database:":"default","filterExpr:":"(key
 < 10) (type: boolean)","Statistics:":"Num rows: 500 Data size: 5312 Basic 
stats: COMPLETE Column stats: 
NONE","table:":"src","isTempTable:":"false","OperatorId:":"TS_0","children":{"Filter
 Operator":{"predicate:":"(key < 10) (type: boolean)","Statistics:":"Num rows: 
166 Data size: 1763 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"FIL_13","children":{"Select Operator":{"expressions:":"key 
(type: string), value (type: 
string)","columnExprMap:":{"_col0":"key","_col1":"value"},"outputColumnNames:":["_col0","_col1"],"Statistics:":"Num
 rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"SEL_2","children":{"Reduce Ou
 tput 
Operator":{"columnExprMap:":{"VALUE._col0":"_col0","VALUE._col1":"_col1"},"sort 
order:":"","Statistics:":"Num rows: 166 Data size: 1763 Basic stats: COMPLETE 
Column stats: NONE","value expressions:":"_col0 (type: string), _col1 (type: 
string)","OperatorId:":"RS_6"}}}}}}}},{"TableScan":{"alias:":"src","columns:":["key","value"],"database:":"default","filterExpr:":"(key
 < 10) (type: boolean)","Statistics:":"Num rows: 500 Data size: 5312 Basic 
stats: COMPLETE Column stats: 
NONE","table:":"src","isTempTable:":"false","OperatorId:":"TS_3","children":{"Filter
 Operator":{"predicate:":"(key < 10) (type: boolean)","Statistics:":"Num rows: 
166 Data size: 1763 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"FIL_14","children":{"Select Operator":{"expressions:":"key 
(type: string), value (type: 
string)","columnExprMap:":{"_col0":"key","_col1":"value"},"outputColumnNames:":["_col0","_col1"],"Statistics:":"Num
 rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE","Oper
 atorId:":"SEL_5","children":{"Reduce Output 
Operator":{"columnExprMap:":{"VALUE._col0":"_col0","VALUE._col1":"_col1"},"sort 
order:":"","Statistics:":"Num rows: 166 Data size: 1763 Basic stats: COMPLETE 
Column stats: NONE","value expressions:":"_col0 (type: string), _col1 (type: 
string)","OperatorId:":"RS_7"}}}}}}}}],"Reduce Operator Tree:":{"Join 
Operator":{"columnExprMap:":{"_col0":"0:VALUE._col0","_col1":"0:VALUE._col1","_col2":"1:VALUE._col0","_col3":"1:VALUE._col1"},"condition
 map:":[{"":"Inner Join 0 to 
1"}],"keys:":{},"outputColumnNames:":["_col0","_col1","_col2","_col3"],"Statistics:":"Num
 rows: 27556 Data size: 612872 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"JOIN_8","children":{"File Output 
Operator":{"compressed:":"false","table:":{"input 
format:":"org.apache.hadoop.mapred.SequenceFileInputFormat","output 
format:":"org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe"},"OperatorId:":"FS
 _15"}}}}}},"Stage-2":{"Map Reduce":{"Map Operator 
Tree:":[{"TableScan":{"columns:":["_col0","_col1","_col2","_col3"],"OperatorId:":"TS_16","children":{"Reduce
 Output 
Operator":{"columnExprMap:":{"KEY.reducesinkkey0":"_col0","KEY.reducesinkkey1":"_col1","KEY.reducesinkkey2":"_col2","KEY.reducesinkkey3":"_col3"},"key
 expressions:":"_col0 (type: string), _col1 (type: string), _col2 (type: 
string), _col3 (type: string)","sort order:":"++++","Statistics:":"Num rows: 
27556 Data size: 612872 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"RS_10"}}}}],"Reduce Operator Tree:":{"Select 
Operator":{"expressions:":"KEY.reducesinkkey0 (type: string), 
KEY.reducesinkkey1 (type: string), KEY.reducesinkkey2 (type: string), 
KEY.reducesinkkey3 (type: 
string)","columnExprMap:":{"_col0":"KEY.reducesinkkey0","_col1":"KEY.reducesinkkey1","_col2":"KEY.reducesinkkey2","_col3":"KEY.reducesinkkey3"},"outputColumnNames:":["_col0","_col1","_col2","_col3"],"Statistics:":"Num
 rows: 27556 Data size: 612872
  Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"SEL_11","children":{"File Output 
Operator":{"compressed:":"false","Statistics:":"Num rows: 27556 Data size: 
612872 Basic stats: COMPLETE Column stats: NONE","table:":{"input 
format:":"org.apache.hadoop.mapred.SequenceFileInputFormat","output 
format:":"org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"},"OperatorId:":"FS_12"}}}}}},"Stage-0":{"Fetch
 Operator":{"limit:":"-1","Processor 
Tree:":{"ListSink":{"OperatorId:":"LIST_SINK_17"}}}}}}
 Warning: Shuffle Join JOIN[8][tables = [src1, src2]] in Stage 'Stage-1:MAPRED' 
is a cross product
 PREHOOK: query: SELECT src1.key as k1, src1.value as v1, 
        src2.key as k2, src2.value as v2 FROM 

http://git-wip-us.apache.org/repos/asf/hive/blob/aa3a5619/ql/src/test/results/clientpositive/parallel_join0.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/parallel_join0.q.out 
b/ql/src/test/results/clientpositive/parallel_join0.q.out
index 003a990..44709bf 100644
--- a/ql/src/test/results/clientpositive/parallel_join0.q.out
+++ b/ql/src/test/results/clientpositive/parallel_join0.q.out
@@ -114,7 +114,7 @@ SELECT src1.key as k1, src1.value as v1,
   (SELECT * FROM src WHERE src.key < 10) src2
   SORT BY k1, v1, k2, v2
 POSTHOOK: type: QUERY
-{"STAGE DEPENDENCIES":{"Stage-1":{"ROOT STAGE":"TRUE"},"Stage-2":{"DEPENDENT 
STAGES":"Stage-1"},"Stage-0":{"DEPENDENT STAGES":"Stage-2"}},"STAGE 
PLANS":{"Stage-1":{"Map Reduce":{"Map Operator 
Tree:":[{"TableScan":{"alias:":"src","columns:":["key","value"],"database:":"default","filterExpr:":"(key
 < 10) (type: boolean)","Statistics:":"Num rows: 500 Data size: 5312 Basic 
stats: COMPLETE Column stats: 
NONE","table:":"src","isTempTable:":"false","OperatorId:":"TS_0","children":{"Filter
 Operator":{"predicate:":"(key < 10) (type: boolean)","Statistics:":"Num rows: 
166 Data size: 1763 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"FIL_13","children":{"Select Operator":{"expressions:":"key 
(type: string), value (type: 
string)","columnExprMap:":{"_col0":"key","_col1":"value"},"outputColumnNames:":["_col0","_col1"],"Statistics:":"Num
 rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"SEL_2","children":{"Reduce Output 
Operator":{"columnExprMap:":{"VALU
 E._col0":"_col0","VALUE._col1":"_col1"},"sort order:":"","Statistics:":"Num 
rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE","value 
expressions:":"_col0 (type: string), _col1 (type: 
string)","OperatorId:":"RS_6"}}}}}}}},{"TableScan":{"alias:":"src","columns:":["key","value"],"database:":"default","filterExpr:":"(key
 < 10) (type: boolean)","Statistics:":"Num rows: 500 Data size: 5312 Basic 
stats: COMPLETE Column stats: 
NONE","table:":"src","isTempTable:":"false","OperatorId:":"TS_3","children":{"Filter
 Operator":{"predicate:":"(key < 10) (type: boolean)","Statistics:":"Num rows: 
166 Data size: 1763 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"FIL_14","children":{"Select Operator":{"expressions:":"key 
(type: string), value (type: 
string)","columnExprMap:":{"_col0":"key","_col1":"value"},"outputColumnNames:":["_col0","_col1"],"Statistics:":"Num
 rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"SEL_5","children":{"Reduce Ou
 tput 
Operator":{"columnExprMap:":{"VALUE._col0":"_col0","VALUE._col1":"_col1"},"sort 
order:":"","Statistics:":"Num rows: 166 Data size: 1763 Basic stats: COMPLETE 
Column stats: NONE","value expressions:":"_col0 (type: string), _col1 (type: 
string)","OperatorId:":"RS_7"}}}}}}}}],"Reduce Operator Tree:":{"Join 
Operator":{"columnExprMap:":{"_col0":"0:VALUE._col0","_col1":"0:VALUE._col1","_col2":"1:VALUE._col0","_col3":"1:VALUE._col1"},"condition
 map:":[{"":"Inner Join 0 to 
1"}],"keys:":{},"outputColumnNames:":["_col0","_col1","_col2","_col3"],"Statistics:":"Num
 rows: 27556 Data size: 612872 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"JOIN_8","children":{"File Output 
Operator":{"compressed:":"false","table:":{"input 
format:":"org.apache.hadoop.mapred.SequenceFileInputFormat","output 
format:":"org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe"},"OperatorId:":"FS_15"}}}}}},"Stage-2":{"Map
 Reduce":{"Ma
 p Operator 
Tree:":[{"TableScan":{"columns:":["_col0","_col1","_col2","_col3"],"OperatorId:":"TS_16","children":{"Reduce
 Output 
Operator":{"columnExprMap:":{"KEY.reducesinkkey0":"_col0","KEY.reducesinkkey1":"_col1","KEY.reducesinkkey2":"_col2","KEY.reducesinkkey3":"_col3"},"key
 expressions:":"_col0 (type: string), _col1 (type: string), _col2 (type: 
string), _col3 (type: string)","sort order:":"++++","Statistics:":"Num rows: 
27556 Data size: 612872 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"RS_10"}}}}],"Reduce Operator Tree:":{"Select 
Operator":{"expressions:":"KEY.reducesinkkey0 (type: string), 
KEY.reducesinkkey1 (type: string), KEY.reducesinkkey2 (type: string), 
KEY.reducesinkkey3 (type: 
string)","columnExprMap:":{"_col0":"KEY.reducesinkkey0","_col1":"KEY.reducesinkkey1","_col2":"KEY.reducesinkkey2","_col3":"KEY.reducesinkkey3"},"outputColumnNames:":["_col0","_col1","_col2","_col3"],"Statistics:":"Num
 rows: 27556 Data size: 612872 Basic stats: COMPLETE Column stats: NO
 NE","OperatorId:":"SEL_11","children":{"File Output 
Operator":{"compressed:":"false","Statistics:":"Num rows: 27556 Data size: 
612872 Basic stats: COMPLETE Column stats: NONE","table:":{"input 
format:":"org.apache.hadoop.mapred.SequenceFileInputFormat","output 
format:":"org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"},"OperatorId:":"FS_12"}}}}}},"Stage-0":{"Fetch
 Operator":{"limit:":"-1","Processor 
Tree:":{"ListSink":{"OperatorId:":"LIST_SINK_17"}}}}}}
+{"cboInfo":"Plan not optimized by CBO.","STAGE DEPENDENCIES":{"Stage-1":{"ROOT 
STAGE":"TRUE"},"Stage-2":{"DEPENDENT STAGES":"Stage-1"},"Stage-0":{"DEPENDENT 
STAGES":"Stage-2"}},"STAGE PLANS":{"Stage-1":{"Map Reduce":{"Map Operator 
Tree:":[{"TableScan":{"alias:":"src","columns:":["key","value"],"database:":"default","filterExpr:":"(key
 < 10) (type: boolean)","Statistics:":"Num rows: 500 Data size: 5312 Basic 
stats: COMPLETE Column stats: 
NONE","table:":"src","isTempTable:":"false","OperatorId:":"TS_0","children":{"Filter
 Operator":{"predicate:":"(key < 10) (type: boolean)","Statistics:":"Num rows: 
166 Data size: 1763 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"FIL_13","children":{"Select Operator":{"expressions:":"key 
(type: string), value (type: 
string)","columnExprMap:":{"_col0":"key","_col1":"value"},"outputColumnNames:":["_col0","_col1"],"Statistics:":"Num
 rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"SEL_2","children":{"Reduce Ou
 tput 
Operator":{"columnExprMap:":{"VALUE._col0":"_col0","VALUE._col1":"_col1"},"sort 
order:":"","Statistics:":"Num rows: 166 Data size: 1763 Basic stats: COMPLETE 
Column stats: NONE","value expressions:":"_col0 (type: string), _col1 (type: 
string)","OperatorId:":"RS_6"}}}}}}}},{"TableScan":{"alias:":"src","columns:":["key","value"],"database:":"default","filterExpr:":"(key
 < 10) (type: boolean)","Statistics:":"Num rows: 500 Data size: 5312 Basic 
stats: COMPLETE Column stats: 
NONE","table:":"src","isTempTable:":"false","OperatorId:":"TS_3","children":{"Filter
 Operator":{"predicate:":"(key < 10) (type: boolean)","Statistics:":"Num rows: 
166 Data size: 1763 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"FIL_14","children":{"Select Operator":{"expressions:":"key 
(type: string), value (type: 
string)","columnExprMap:":{"_col0":"key","_col1":"value"},"outputColumnNames:":["_col0","_col1"],"Statistics:":"Num
 rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE","Oper
 atorId:":"SEL_5","children":{"Reduce Output 
Operator":{"columnExprMap:":{"VALUE._col0":"_col0","VALUE._col1":"_col1"},"sort 
order:":"","Statistics:":"Num rows: 166 Data size: 1763 Basic stats: COMPLETE 
Column stats: NONE","value expressions:":"_col0 (type: string), _col1 (type: 
string)","OperatorId:":"RS_7"}}}}}}}}],"Reduce Operator Tree:":{"Join 
Operator":{"columnExprMap:":{"_col0":"0:VALUE._col0","_col1":"0:VALUE._col1","_col2":"1:VALUE._col0","_col3":"1:VALUE._col1"},"condition
 map:":[{"":"Inner Join 0 to 
1"}],"keys:":{},"outputColumnNames:":["_col0","_col1","_col2","_col3"],"Statistics:":"Num
 rows: 27556 Data size: 612872 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"JOIN_8","children":{"File Output 
Operator":{"compressed:":"false","table:":{"input 
format:":"org.apache.hadoop.mapred.SequenceFileInputFormat","output 
format:":"org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe"},"OperatorId:":"FS
 _15"}}}}}},"Stage-2":{"Map Reduce":{"Map Operator 
Tree:":[{"TableScan":{"columns:":["_col0","_col1","_col2","_col3"],"OperatorId:":"TS_16","children":{"Reduce
 Output 
Operator":{"columnExprMap:":{"KEY.reducesinkkey0":"_col0","KEY.reducesinkkey1":"_col1","KEY.reducesinkkey2":"_col2","KEY.reducesinkkey3":"_col3"},"key
 expressions:":"_col0 (type: string), _col1 (type: string), _col2 (type: 
string), _col3 (type: string)","sort order:":"++++","Statistics:":"Num rows: 
27556 Data size: 612872 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"RS_10"}}}}],"Reduce Operator Tree:":{"Select 
Operator":{"expressions:":"KEY.reducesinkkey0 (type: string), 
KEY.reducesinkkey1 (type: string), KEY.reducesinkkey2 (type: string), 
KEY.reducesinkkey3 (type: 
string)","columnExprMap:":{"_col0":"KEY.reducesinkkey0","_col1":"KEY.reducesinkkey1","_col2":"KEY.reducesinkkey2","_col3":"KEY.reducesinkkey3"},"outputColumnNames:":["_col0","_col1","_col2","_col3"],"Statistics:":"Num
 rows: 27556 Data size: 612872
  Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"SEL_11","children":{"File Output 
Operator":{"compressed:":"false","Statistics:":"Num rows: 27556 Data size: 
612872 Basic stats: COMPLETE Column stats: NONE","table:":{"input 
format:":"org.apache.hadoop.mapred.SequenceFileInputFormat","output 
format:":"org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"},"OperatorId:":"FS_12"}}}}}},"Stage-0":{"Fetch
 Operator":{"limit:":"-1","Processor 
Tree:":{"ListSink":{"OperatorId:":"LIST_SINK_17"}}}}}}
 Warning: Shuffle Join JOIN[8][tables = [src1, src2]] in Stage 'Stage-1:MAPRED' 
is a cross product
 PREHOOK: query: SELECT src1.key as k1, src1.value as v1, 
        src2.key as k2, src2.value as v2 FROM 

http://git-wip-us.apache.org/repos/asf/hive/blob/aa3a5619/ql/src/test/results/clientpositive/plan_json.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/plan_json.q.out 
b/ql/src/test/results/clientpositive/plan_json.q.out
index f1212ef..6007d2d 100644
--- a/ql/src/test/results/clientpositive/plan_json.q.out
+++ b/ql/src/test/results/clientpositive/plan_json.q.out
@@ -2,4 +2,4 @@ PREHOOK: query: EXPLAIN FORMATTED SELECT count(1) FROM src
 PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN FORMATTED SELECT count(1) FROM src
 POSTHOOK: type: QUERY
-{"optimizedSQL":"SELECT COUNT(*) AS `$f0`\nFROM `default`.`src`","STAGE 
DEPENDENCIES":{"Stage-0":{"ROOT STAGE":"TRUE"}},"STAGE 
PLANS":{"Stage-0":{"Fetch Operator":{"limit:":"1","Processor 
Tree:":{"ListSink":{"OperatorId:":"LIST_SINK_7"}}}}}}
+{"optimizedSQL":"SELECT COUNT(*) AS `$f0`\nFROM 
`default`.`src`","cboInfo":"Plan optimized by CBO.","STAGE 
DEPENDENCIES":{"Stage-0":{"ROOT STAGE":"TRUE"}},"STAGE 
PLANS":{"Stage-0":{"Fetch Operator":{"limit:":"1","Processor 
Tree:":{"ListSink":{"OperatorId:":"LIST_SINK_7"}}}}}}

http://git-wip-us.apache.org/repos/asf/hive/blob/aa3a5619/ql/src/test/results/clientpositive/vector_outer_join3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vector_outer_join3.q.out 
b/ql/src/test/results/clientpositive/vector_outer_join3.q.out
index 45d9c3e..1f1c131 100644
--- a/ql/src/test/results/clientpositive/vector_outer_join3.q.out
+++ b/ql/src/test/results/clientpositive/vector_outer_join3.q.out
@@ -244,7 +244,7 @@ left outer join small_alltypesorc_a_n1 hd
   on hd.cstring1 = c.cstring1
 ) t1
 POSTHOOK: type: QUERY
-{"optimizedSQL":"SELECT COUNT(*) AS `$f0`\nFROM (SELECT `cint`, 
`cstring1`\nFROM `default`.`small_alltypesorc_a_n1`) AS `t`\nLEFT JOIN (SELECT 
`cint`\nFROM `default`.`small_alltypesorc_a_n1`) AS `t0` ON `t`.`cint` = 
`t0`.`cint`\nLEFT JOIN (SELECT `cstring1`\nFROM 
`default`.`small_alltypesorc_a_n1`) AS `t1` ON `t`.`cstring1` = 
`t1`.`cstring1`","PLAN 
VECTORIZATION":{"enabled":true,"enabledConditionsMet":["hive.vectorized.execution.enabled
 IS true"]},"STAGE DEPENDENCIES":{"Stage-8":{"ROOT 
STAGE":"TRUE"},"Stage-3":{"DEPENDENT STAGES":"Stage-8"},"Stage-0":{"DEPENDENT 
STAGES":"Stage-3"}},"STAGE PLANS":{"Stage-8":{"Map Reduce Local Work":{"Alias 
-> Map Local Tables:":{"$hdt$_1:cd":{"Fetch 
Operator":{"limit:":"-1"}},"$hdt$_2:hd":{"Fetch 
Operator":{"limit:":"-1"}}},"Alias -> Map Local Operator 
Tree:":{"$hdt$_1:cd":{"TableScan":{"alias:":"cd","columns:":["cint"],"database:":"default","Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","table:":"small_alltypes
 orc_a_n1","isTempTable:":"false","OperatorId:":"TS_2","children":{"Select 
Operator":{"expressions:":"cint (type: 
int)","columnExprMap:":{"_col0":"cint"},"outputColumnNames:":["_col0"],"Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"SEL_3","children":{"HashTable Sink 
Operator":{"keys:":{"0":"_col0 (type: int)","1":"_col0 (type: 
int)"},"OperatorId:":"HASHTABLESINK_26"}}}}}},"$hdt$_2:hd":{"TableScan":{"alias:":"hd","columns:":["cstring1"],"database:":"default","Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","table:":"small_alltypesorc_a_n1","isTempTable:":"false","OperatorId:":"TS_4","children":{"Select
 Operator":{"expressions:":"cstring1 (type: 
string)","columnExprMap:":{"_col0":"cstring1"},"outputColumnNames:":["_col0"],"Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"SEL_5","children":{"HashTable Sink 
Operator":{"keys:":{"0":"_col1 (type: str
 ing)","1":"_col0 (type: 
string)"},"OperatorId:":"HASHTABLESINK_24"}}}}}}}}},"Stage-3":{"Map 
Reduce":{"Map Operator 
Tree:":[{"TableScan":{"alias:":"c","columns:":["cint","cstring1"],"database:":"default","Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","table:":"small_alltypesorc_a_n1","TableScan 
Vectorization:":{"native:":"true","vectorizationSchemaColumns:":"[0:ctinyint:tinyint,
 1:csmallint:smallint, 2:cint:int, 3:cbigint:bigint, 4:cfloat:float, 
5:cdouble:double, 6:cstring1:string, 7:cstring2:string, 
8:ctimestamp1:timestamp, 9:ctimestamp2:timestamp, 10:cboolean1:boolean, 
11:cboolean2:boolean, 
12:ROW__ID:struct<writeid:bigint,bucketid:int,rowid:bigint>]"},"isTempTable:":"false","OperatorId:":"TS_0","children":{"Select
 Operator":{"expressions:":"cint (type: int), cstring1 (type: 
string)","columnExprMap:":{"_col0":"cint","_col1":"cstring1"},"outputColumnNames:":["_col0","_col1"],"Select
 Vectorization:":{"className:":"VectorSelectOperator","native:"
 :"true","projectedOutputColumnNums:":"[2, 6]"},"Statistics:":"Num rows: 20 
Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"SEL_28","children":{"Map Join 
Operator":{"columnExprMap:":{"_col1":"0:_col1"},"condition map:":[{"":"Left 
Outer Join 0 to 1"}],"keys:":{"0":"_col0 (type: int)","1":"_col0 (type: 
int)"},"Map Join Vectorization:":{"bigTableKeyExpressions:":["col 
2:int"],"bigTableValueExpressions:":["col 
6:string"],"className:":"VectorMapJoinOperator","native:":"false","nativeConditionsMet:":["hive.mapjoin.optimized.hashtable
 IS true","hive.vectorized.execution.mapjoin.native.enabled IS true","One 
MapJoin Condition IS true","No nullsafe IS true","Small table vectorizes IS 
true","Outer Join has keys IS true","Optimized Table and Supports Key Types IS 
true"],"nativeConditionsNotMet:":["hive.execution.engine mr IN [tez, spark] IS 
false"]},"outputColumnNames:":["_col1"],"Statistics:":"Num rows: 22 Data size: 
4840 Basic stats: COMPLETE Column stats: NONE","Opera
 torId:":"MAPJOIN_29","children":{"Map Join Operator":{"condition 
map:":[{"":"Left Outer Join 0 to 1"}],"keys:":{"0":"_col1 (type: 
string)","1":"_col0 (type: string)"},"Map Join 
Vectorization:":{"bigTableKeyExpressions:":["col 
0:string"],"className:":"VectorMapJoinOperator","native:":"false","nativeConditionsMet:":["hive.mapjoin.optimized.hashtable
 IS true","hive.vectorized.execution.mapjoin.native.enabled IS true","One 
MapJoin Condition IS true","No nullsafe IS true","Small table vectorizes IS 
true","Outer Join has keys IS true","Optimized Table and Supports Key Types IS 
true"],"nativeConditionsNotMet:":["hive.execution.engine mr IN [tez, spark] IS 
false"]},"Statistics:":"Num rows: 24 Data size: 5324 Basic stats: COMPLETE 
Column stats: NONE","OperatorId:":"MAPJOIN_30","children":{"Group By 
Operator":{"aggregations:":["count()"],"Group By 
Vectorization:":{"aggregators:":["VectorUDAFCountStar(*) -> 
bigint"],"className:":"VectorGroupByOperator","groupByMode:":"HASH","native:":"false","
 
vectorProcessingMode:":"HASH","projectedOutputColumnNums:":"[0]"},"mode:":"hash","outputColumnNames:":["_col0"],"Statistics:":"Num
 rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"GBY_31","children":{"Reduce Output 
Operator":{"columnExprMap:":{"VALUE._col0":"_col0"},"sort order:":"","Reduce 
Sink 
Vectorization:":{"className:":"VectorReduceSinkOperator","native:":"false","nativeConditionsMet:":["hive.vectorized.execution.reducesink.new.enabled
 IS true","No PTF TopN IS true","No DISTINCT columns IS 
true","BinarySortableSerDe for keys IS true","LazyBinarySerDe for values IS 
true"],"nativeConditionsNotMet:":["hive.execution.engine mr IN [tez, spark] IS 
false"]},"Statistics:":"Num rows: 1 Data size: 8 Basic stats: COMPLETE Column 
stats: NONE","value expressions:":"_col0 (type: 
bigint)","OperatorId:":"RS_32"}}}}}}}}}}}}],"Execution mode:":"vectorized","Map 
Vectorization:":{"enabled:":"true","enabledConditionsMet:":["hive.vectorized.use.vectorized.input.format
 I
 S 
true"],"inputFormatFeatureSupport:":"[DECIMAL_64]","featureSupportInUse:":"[DECIMAL_64]","inputFileFormats:":["org.apache.hadoop.hive.ql.io.orc.OrcInputFormat"],"allNative:":"false","usesVectorUDFAdaptor:":"false","vectorized:":"true","rowBatchContext:":{"dataColumnCount:":"12","includeColumns:":"[2,
 
6]","dataColumns:":["ctinyint:tinyint","csmallint:smallint","cint:int","cbigint:bigint","cfloat:float","cdouble:double","cstring1:string","cstring2:string","ctimestamp1:timestamp","ctimestamp2:timestamp","cboolean1:boolean","cboolean2:boolean"],"partitionColumnCount:":"0","scratchColumnTypeNames:":"[]"}},"Local
 Work:":{"Map Reduce Local Work":{}},"Reduce 
Vectorization:":{"enabled:":"false","enableConditionsMet:":["hive.vectorized.execution.reduce.enabled
 IS true"],"enableConditionsNotMet:":["hive.execution.engine mr IN [tez, spark] 
IS false"]},"Reduce Operator Tree:":{"Group By 
Operator":{"aggregations:":["count(VALUE._col0)"],"mode:":"mergepartial","outputColumnNames:":["_col0"],"Sta
 tistics:":"Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"GBY_15","children":{"File Output 
Operator":{"compressed:":"false","Statistics:":"Num rows: 1 Data size: 8 Basic 
stats: COMPLETE Column stats: NONE","table:":{"input 
format:":"org.apache.hadoop.mapred.SequenceFileInputFormat","output 
format:":"org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"},"OperatorId:":"FS_17"}}}}}},"Stage-0":{"Fetch
 Operator":{"limit:":"-1","Processor 
Tree:":{"ListSink":{"OperatorId:":"LIST_SINK_33"}}}}}}
+{"optimizedSQL":"SELECT COUNT(*) AS `$f0`\nFROM (SELECT `cint`, 
`cstring1`\nFROM `default`.`small_alltypesorc_a_n1`) AS `t`\nLEFT JOIN (SELECT 
`cint`\nFROM `default`.`small_alltypesorc_a_n1`) AS `t0` ON `t`.`cint` = 
`t0`.`cint`\nLEFT JOIN (SELECT `cstring1`\nFROM 
`default`.`small_alltypesorc_a_n1`) AS `t1` ON `t`.`cstring1` = 
`t1`.`cstring1`","PLAN 
VECTORIZATION":{"enabled":true,"enabledConditionsMet":["hive.vectorized.execution.enabled
 IS true"]},"cboInfo":"Plan optimized by CBO.","STAGE 
DEPENDENCIES":{"Stage-8":{"ROOT STAGE":"TRUE"},"Stage-3":{"DEPENDENT 
STAGES":"Stage-8"},"Stage-0":{"DEPENDENT STAGES":"Stage-3"}},"STAGE 
PLANS":{"Stage-8":{"Map Reduce Local Work":{"Alias -> Map Local 
Tables:":{"$hdt$_1:cd":{"Fetch Operator":{"limit:":"-1"}},"$hdt$_2:hd":{"Fetch 
Operator":{"limit:":"-1"}}},"Alias -> Map Local Operator 
Tree:":{"$hdt$_1:cd":{"TableScan":{"alias:":"cd","columns:":["cint"],"database:":"default","Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column st
 ats: 
NONE","table:":"small_alltypesorc_a_n1","isTempTable:":"false","OperatorId:":"TS_2","children":{"Select
 Operator":{"expressions:":"cint (type: 
int)","columnExprMap:":{"_col0":"cint"},"outputColumnNames:":["_col0"],"Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"SEL_3","children":{"HashTable Sink 
Operator":{"keys:":{"0":"_col0 (type: int)","1":"_col0 (type: 
int)"},"OperatorId:":"HASHTABLESINK_26"}}}}}},"$hdt$_2:hd":{"TableScan":{"alias:":"hd","columns:":["cstring1"],"database:":"default","Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","table:":"small_alltypesorc_a_n1","isTempTable:":"false","OperatorId:":"TS_4","children":{"Select
 Operator":{"expressions:":"cstring1 (type: 
string)","columnExprMap:":{"_col0":"cstring1"},"outputColumnNames:":["_col0"],"Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"SEL_5","children":{"HashTable Sink Operat
 or":{"keys:":{"0":"_col1 (type: string)","1":"_col0 (type: 
string)"},"OperatorId:":"HASHTABLESINK_24"}}}}}}}}},"Stage-3":{"Map 
Reduce":{"Map Operator 
Tree:":[{"TableScan":{"alias:":"c","columns:":["cint","cstring1"],"database:":"default","Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","table:":"small_alltypesorc_a_n1","TableScan 
Vectorization:":{"native:":"true","vectorizationSchemaColumns:":"[0:ctinyint:tinyint,
 1:csmallint:smallint, 2:cint:int, 3:cbigint:bigint, 4:cfloat:float, 
5:cdouble:double, 6:cstring1:string, 7:cstring2:string, 
8:ctimestamp1:timestamp, 9:ctimestamp2:timestamp, 10:cboolean1:boolean, 
11:cboolean2:boolean, 
12:ROW__ID:struct<writeid:bigint,bucketid:int,rowid:bigint>]"},"isTempTable:":"false","OperatorId:":"TS_0","children":{"Select
 Operator":{"expressions:":"cint (type: int), cstring1 (type: 
string)","columnExprMap:":{"_col0":"cint","_col1":"cstring1"},"outputColumnNames:":["_col0","_col1"],"Select
 Vectorization:":{"className
 :":"VectorSelectOperator","native:":"true","projectedOutputColumnNums:":"[2, 
6]"},"Statistics:":"Num rows: 20 Data size: 4400 Basic stats: COMPLETE Column 
stats: NONE","OperatorId:":"SEL_28","children":{"Map Join 
Operator":{"columnExprMap:":{"_col1":"0:_col1"},"condition map:":[{"":"Left 
Outer Join 0 to 1"}],"keys:":{"0":"_col0 (type: int)","1":"_col0 (type: 
int)"},"Map Join Vectorization:":{"bigTableKeyExpressions:":["col 
2:int"],"bigTableValueExpressions:":["col 
6:string"],"className:":"VectorMapJoinOperator","native:":"false","nativeConditionsMet:":["hive.mapjoin.optimized.hashtable
 IS true","hive.vectorized.execution.mapjoin.native.enabled IS true","One 
MapJoin Condition IS true","No nullsafe IS true","Small table vectorizes IS 
true","Outer Join has keys IS true","Optimized Table and Supports Key Types IS 
true"],"nativeConditionsNotMet:":["hive.execution.engine mr IN [tez, spark] IS 
false"]},"outputColumnNames:":["_col1"],"Statistics:":"Num rows: 22 Data size: 
4840 Basic stats: 
 COMPLETE Column stats: NONE","OperatorId:":"MAPJOIN_29","children":{"Map Join 
Operator":{"condition map:":[{"":"Left Outer Join 0 to 1"}],"keys:":{"0":"_col1 
(type: string)","1":"_col0 (type: string)"},"Map Join 
Vectorization:":{"bigTableKeyExpressions:":["col 
0:string"],"className:":"VectorMapJoinOperator","native:":"false","nativeConditionsMet:":["hive.mapjoin.optimized.hashtable
 IS true","hive.vectorized.execution.mapjoin.native.enabled IS true","One 
MapJoin Condition IS true","No nullsafe IS true","Small table vectorizes IS 
true","Outer Join has keys IS true","Optimized Table and Supports Key Types IS 
true"],"nativeConditionsNotMet:":["hive.execution.engine mr IN [tez, spark] IS 
false"]},"Statistics:":"Num rows: 24 Data size: 5324 Basic stats: COMPLETE 
Column stats: NONE","OperatorId:":"MAPJOIN_30","children":{"Group By 
Operator":{"aggregations:":["count()"],"Group By 
Vectorization:":{"aggregators:":["VectorUDAFCountStar(*) -> 
bigint"],"className:":"VectorGroupByOperator","group
 
ByMode:":"HASH","native:":"false","vectorProcessingMode:":"HASH","projectedOutputColumnNums:":"[0]"},"mode:":"hash","outputColumnNames:":["_col0"],"Statistics:":"Num
 rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"GBY_31","children":{"Reduce Output 
Operator":{"columnExprMap:":{"VALUE._col0":"_col0"},"sort order:":"","Reduce 
Sink 
Vectorization:":{"className:":"VectorReduceSinkOperator","native:":"false","nativeConditionsMet:":["hive.vectorized.execution.reducesink.new.enabled
 IS true","No PTF TopN IS true","No DISTINCT columns IS 
true","BinarySortableSerDe for keys IS true","LazyBinarySerDe for values IS 
true"],"nativeConditionsNotMet:":["hive.execution.engine mr IN [tez, spark] IS 
false"]},"Statistics:":"Num rows: 1 Data size: 8 Basic stats: COMPLETE Column 
stats: NONE","value expressions:":"_col0 (type: 
bigint)","OperatorId:":"RS_32"}}}}}}}}}}}}],"Execution mode:":"vectorized","Map 
Vectorization:":{"enabled:":"true","enabledConditionsMet:":["hive.vecto
 rized.use.vectorized.input.format IS 
true"],"inputFormatFeatureSupport:":"[DECIMAL_64]","featureSupportInUse:":"[DECIMAL_64]","inputFileFormats:":["org.apache.hadoop.hive.ql.io.orc.OrcInputFormat"],"allNative:":"false","usesVectorUDFAdaptor:":"false","vectorized:":"true","rowBatchContext:":{"dataColumnCount:":"12","includeColumns:":"[2,
 
6]","dataColumns:":["ctinyint:tinyint","csmallint:smallint","cint:int","cbigint:bigint","cfloat:float","cdouble:double","cstring1:string","cstring2:string","ctimestamp1:timestamp","ctimestamp2:timestamp","cboolean1:boolean","cboolean2:boolean"],"partitionColumnCount:":"0","scratchColumnTypeNames:":"[]"}},"Local
 Work:":{"Map Reduce Local Work":{}},"Reduce 
Vectorization:":{"enabled:":"false","enableConditionsMet:":["hive.vectorized.execution.reduce.enabled
 IS true"],"enableConditionsNotMet:":["hive.execution.engine mr IN [tez, spark] 
IS false"]},"Reduce Operator Tree:":{"Group By 
Operator":{"aggregations:":["count(VALUE._col0)"],"mode:":"mergepartial",
 "outputColumnNames:":["_col0"],"Statistics:":"Num rows: 1 Data size: 8 Basic 
stats: COMPLETE Column stats: NONE","OperatorId:":"GBY_15","children":{"File 
Output Operator":{"compressed:":"false","Statistics:":"Num rows: 1 Data size: 8 
Basic stats: COMPLETE Column stats: NONE","table:":{"input 
format:":"org.apache.hadoop.mapred.SequenceFileInputFormat","output 
format:":"org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"},"OperatorId:":"FS_17"}}}}}},"Stage-0":{"Fetch
 Operator":{"limit:":"-1","Processor 
Tree:":{"ListSink":{"OperatorId:":"LIST_SINK_33"}}}}}}
 PREHOOK: query: select count(*) from (select c.cstring1
 from small_alltypesorc_a_n1 c
 left outer join small_alltypesorc_a_n1 cd
@@ -284,7 +284,7 @@ left outer join small_alltypesorc_a_n1 hd
   on hd.cstring1 = c.cstring1
 ) t1
 POSTHOOK: type: QUERY
-{"optimizedSQL":"SELECT COUNT(*) AS `$f0`\nFROM (SELECT `cstring1`, 
`cstring2`\nFROM `default`.`small_alltypesorc_a_n1`) AS `t`\nLEFT JOIN (SELECT 
`cstring2`\nFROM `default`.`small_alltypesorc_a_n1`) AS `t0` ON `t`.`cstring2` 
= `t0`.`cstring2`\nLEFT JOIN (SELECT `cstring1`\nFROM 
`default`.`small_alltypesorc_a_n1`) AS `t1` ON `t`.`cstring1` = 
`t1`.`cstring1`","PLAN 
VECTORIZATION":{"enabled":true,"enabledConditionsMet":["hive.vectorized.execution.enabled
 IS true"]},"STAGE DEPENDENCIES":{"Stage-8":{"ROOT 
STAGE":"TRUE"},"Stage-3":{"DEPENDENT STAGES":"Stage-8"},"Stage-0":{"DEPENDENT 
STAGES":"Stage-3"}},"STAGE PLANS":{"Stage-8":{"Map Reduce Local Work":{"Alias 
-> Map Local Tables:":{"$hdt$_1:cd":{"Fetch 
Operator":{"limit:":"-1"}},"$hdt$_2:hd":{"Fetch 
Operator":{"limit:":"-1"}}},"Alias -> Map Local Operator 
Tree:":{"$hdt$_1:cd":{"TableScan":{"alias:":"cd","columns:":["cstring2"],"database:":"default","Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: NONE","tab
 
le:":"small_alltypesorc_a_n1","isTempTable:":"false","OperatorId:":"TS_2","children":{"Select
 Operator":{"expressions:":"cstring2 (type: 
string)","columnExprMap:":{"_col0":"cstring2"},"outputColumnNames:":["_col0"],"Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"SEL_3","children":{"HashTable Sink 
Operator":{"keys:":{"0":"_col1 (type: string)","1":"_col0 (type: 
string)"},"OperatorId:":"HASHTABLESINK_26"}}}}}},"$hdt$_2:hd":{"TableScan":{"alias:":"hd","columns:":["cstring1"],"database:":"default","Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","table:":"small_alltypesorc_a_n1","isTempTable:":"false","OperatorId:":"TS_4","children":{"Select
 Operator":{"expressions:":"cstring1 (type: 
string)","columnExprMap:":{"_col0":"cstring1"},"outputColumnNames:":["_col0"],"Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"SEL_5","children":{"HashTable Sink Oper
 ator":{"keys:":{"0":"_col0 (type: string)","1":"_col0 (type: 
string)"},"OperatorId:":"HASHTABLESINK_24"}}}}}}}}},"Stage-3":{"Map 
Reduce":{"Map Operator 
Tree:":[{"TableScan":{"alias:":"c","columns:":["cstring1","cstring2"],"database:":"default","Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","table:":"small_alltypesorc_a_n1","TableScan 
Vectorization:":{"native:":"true","vectorizationSchemaColumns:":"[0:ctinyint:tinyint,
 1:csmallint:smallint, 2:cint:int, 3:cbigint:bigint, 4:cfloat:float, 
5:cdouble:double, 6:cstring1:string, 7:cstring2:string, 
8:ctimestamp1:timestamp, 9:ctimestamp2:timestamp, 10:cboolean1:boolean, 
11:cboolean2:boolean, 
12:ROW__ID:struct<writeid:bigint,bucketid:int,rowid:bigint>]"},"isTempTable:":"false","OperatorId:":"TS_0","children":{"Select
 Operator":{"expressions:":"cstring1 (type: string), cstring2 (type: 
string)","columnExprMap:":{"_col0":"cstring1","_col1":"cstring2"},"outputColumnNames:":["_col0","_col1"],"Select
 Vectorizat
 
ion:":{"className:":"VectorSelectOperator","native:":"true","projectedOutputColumnNums:":"[6,
 7]"},"Statistics:":"Num rows: 20 Data size: 4400 Basic stats: COMPLETE Column 
stats: NONE","OperatorId:":"SEL_28","children":{"Map Join 
Operator":{"columnExprMap:":{"_col0":"0:_col0"},"condition map:":[{"":"Left 
Outer Join 0 to 1"}],"keys:":{"0":"_col1 (type: string)","1":"_col0 (type: 
string)"},"Map Join Vectorization:":{"bigTableKeyExpressions:":["col 
7:string"],"bigTableValueExpressions:":["col 
6:string"],"className:":"VectorMapJoinOperator","native:":"false","nativeConditionsMet:":["hive.mapjoin.optimized.hashtable
 IS true","hive.vectorized.execution.mapjoin.native.enabled IS true","One 
MapJoin Condition IS true","No nullsafe IS true","Small table vectorizes IS 
true","Outer Join has keys IS true","Optimized Table and Supports Key Types IS 
true"],"nativeConditionsNotMet:":["hive.execution.engine mr IN [tez, spark] IS 
false"]},"outputColumnNames:":["_col0"],"Statistics:":"Num rows: 22 Dat
 a size: 4840 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"MAPJOIN_29","children":{"Map Join Operator":{"condition 
map:":[{"":"Left Outer Join 0 to 1"}],"keys:":{"0":"_col0 (type: 
string)","1":"_col0 (type: string)"},"Map Join 
Vectorization:":{"bigTableKeyExpressions:":["col 
0:string"],"className:":"VectorMapJoinOperator","native:":"false","nativeConditionsMet:":["hive.mapjoin.optimized.hashtable
 IS true","hive.vectorized.execution.mapjoin.native.enabled IS true","One 
MapJoin Condition IS true","No nullsafe IS true","Small table vectorizes IS 
true","Outer Join has keys IS true","Optimized Table and Supports Key Types IS 
true"],"nativeConditionsNotMet:":["hive.execution.engine mr IN [tez, spark] IS 
false"]},"Statistics:":"Num rows: 24 Data size: 5324 Basic stats: COMPLETE 
Column stats: NONE","OperatorId:":"MAPJOIN_30","children":{"Group By 
Operator":{"aggregations:":["count()"],"Group By 
Vectorization:":{"aggregators:":["VectorUDAFCountStar(*) -> 
bigint"],"className:":"Vec
 
torGroupByOperator","groupByMode:":"HASH","native:":"false","vectorProcessingMode:":"HASH","projectedOutputColumnNums:":"[0]"},"mode:":"hash","outputColumnNames:":["_col0"],"Statistics:":"Num
 rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"GBY_31","children":{"Reduce Output 
Operator":{"columnExprMap:":{"VALUE._col0":"_col0"},"sort order:":"","Reduce 
Sink 
Vectorization:":{"className:":"VectorReduceSinkOperator","native:":"false","nativeConditionsMet:":["hive.vectorized.execution.reducesink.new.enabled
 IS true","No PTF TopN IS true","No DISTINCT columns IS 
true","BinarySortableSerDe for keys IS true","LazyBinarySerDe for values IS 
true"],"nativeConditionsNotMet:":["hive.execution.engine mr IN [tez, spark] IS 
false"]},"Statistics:":"Num rows: 1 Data size: 8 Basic stats: COMPLETE Column 
stats: NONE","value expressions:":"_col0 (type: 
bigint)","OperatorId:":"RS_32"}}}}}}}}}}}}],"Execution mode:":"vectorized","Map 
Vectorization:":{"enabled:":"true","enabledCo
 nditionsMet:":["hive.vectorized.use.vectorized.input.format IS 
true"],"inputFormatFeatureSupport:":"[DECIMAL_64]","featureSupportInUse:":"[DECIMAL_64]","inputFileFormats:":["org.apache.hadoop.hive.ql.io.orc.OrcInputFormat"],"allNative:":"false","usesVectorUDFAdaptor:":"false","vectorized:":"true","rowBatchContext:":{"dataColumnCount:":"12","includeColumns:":"[6,
 
7]","dataColumns:":["ctinyint:tinyint","csmallint:smallint","cint:int","cbigint:bigint","cfloat:float","cdouble:double","cstring1:string","cstring2:string","ctimestamp1:timestamp","ctimestamp2:timestamp","cboolean1:boolean","cboolean2:boolean"],"partitionColumnCount:":"0","scratchColumnTypeNames:":"[]"}},"Local
 Work:":{"Map Reduce Local Work":{}},"Reduce 
Vectorization:":{"enabled:":"false","enableConditionsMet:":["hive.vectorized.execution.reduce.enabled
 IS true"],"enableConditionsNotMet:":["hive.execution.engine mr IN [tez, spark] 
IS false"]},"Reduce Operator Tree:":{"Group By 
Operator":{"aggregations:":["count(VALUE._col0)
 "],"mode:":"mergepartial","outputColumnNames:":["_col0"],"Statistics:":"Num 
rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"GBY_15","children":{"File Output 
Operator":{"compressed:":"false","Statistics:":"Num rows: 1 Data size: 8 Basic 
stats: COMPLETE Column stats: NONE","table:":{"input 
format:":"org.apache.hadoop.mapred.SequenceFileInputFormat","output 
format:":"org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"},"OperatorId:":"FS_17"}}}}}},"Stage-0":{"Fetch
 Operator":{"limit:":"-1","Processor 
Tree:":{"ListSink":{"OperatorId:":"LIST_SINK_33"}}}}}}
+{"optimizedSQL":"SELECT COUNT(*) AS `$f0`\nFROM (SELECT `cstring1`, 
`cstring2`\nFROM `default`.`small_alltypesorc_a_n1`) AS `t`\nLEFT JOIN (SELECT 
`cstring2`\nFROM `default`.`small_alltypesorc_a_n1`) AS `t0` ON `t`.`cstring2` 
= `t0`.`cstring2`\nLEFT JOIN (SELECT `cstring1`\nFROM 
`default`.`small_alltypesorc_a_n1`) AS `t1` ON `t`.`cstring1` = 
`t1`.`cstring1`","PLAN 
VECTORIZATION":{"enabled":true,"enabledConditionsMet":["hive.vectorized.execution.enabled
 IS true"]},"cboInfo":"Plan optimized by CBO.","STAGE 
DEPENDENCIES":{"Stage-8":{"ROOT STAGE":"TRUE"},"Stage-3":{"DEPENDENT 
STAGES":"Stage-8"},"Stage-0":{"DEPENDENT STAGES":"Stage-3"}},"STAGE 
PLANS":{"Stage-8":{"Map Reduce Local Work":{"Alias -> Map Local 
Tables:":{"$hdt$_1:cd":{"Fetch Operator":{"limit:":"-1"}},"$hdt$_2:hd":{"Fetch 
Operator":{"limit:":"-1"}}},"Alias -> Map Local Operator 
Tree:":{"$hdt$_1:cd":{"TableScan":{"alias:":"cd","columns:":["cstring2"],"database:":"default","Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats
 : COMPLETE Column stats: 
NONE","table:":"small_alltypesorc_a_n1","isTempTable:":"false","OperatorId:":"TS_2","children":{"Select
 Operator":{"expressions:":"cstring2 (type: 
string)","columnExprMap:":{"_col0":"cstring2"},"outputColumnNames:":["_col0"],"Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"SEL_3","children":{"HashTable Sink 
Operator":{"keys:":{"0":"_col1 (type: string)","1":"_col0 (type: 
string)"},"OperatorId:":"HASHTABLESINK_26"}}}}}},"$hdt$_2:hd":{"TableScan":{"alias:":"hd","columns:":["cstring1"],"database:":"default","Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","table:":"small_alltypesorc_a_n1","isTempTable:":"false","OperatorId:":"TS_4","children":{"Select
 Operator":{"expressions:":"cstring1 (type: 
string)","columnExprMap:":{"_col0":"cstring1"},"outputColumnNames:":["_col0"],"Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"SEL_
 5","children":{"HashTable Sink Operator":{"keys:":{"0":"_col0 (type: 
string)","1":"_col0 (type: 
string)"},"OperatorId:":"HASHTABLESINK_24"}}}}}}}}},"Stage-3":{"Map 
Reduce":{"Map Operator 
Tree:":[{"TableScan":{"alias:":"c","columns:":["cstring1","cstring2"],"database:":"default","Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","table:":"small_alltypesorc_a_n1","TableScan 
Vectorization:":{"native:":"true","vectorizationSchemaColumns:":"[0:ctinyint:tinyint,
 1:csmallint:smallint, 2:cint:int, 3:cbigint:bigint, 4:cfloat:float, 
5:cdouble:double, 6:cstring1:string, 7:cstring2:string, 
8:ctimestamp1:timestamp, 9:ctimestamp2:timestamp, 10:cboolean1:boolean, 
11:cboolean2:boolean, 
12:ROW__ID:struct<writeid:bigint,bucketid:int,rowid:bigint>]"},"isTempTable:":"false","OperatorId:":"TS_0","children":{"Select
 Operator":{"expressions:":"cstring1 (type: string), cstring2 (type: 
string)","columnExprMap:":{"_col0":"cstring1","_col1":"cstring2"},"outputColumnNames:":[
 "_col0","_col1"],"Select 
Vectorization:":{"className:":"VectorSelectOperator","native:":"true","projectedOutputColumnNums:":"[6,
 7]"},"Statistics:":"Num rows: 20 Data size: 4400 Basic stats: COMPLETE Column 
stats: NONE","OperatorId:":"SEL_28","children":{"Map Join 
Operator":{"columnExprMap:":{"_col0":"0:_col0"},"condition map:":[{"":"Left 
Outer Join 0 to 1"}],"keys:":{"0":"_col1 (type: string)","1":"_col0 (type: 
string)"},"Map Join Vectorization:":{"bigTableKeyExpressions:":["col 
7:string"],"bigTableValueExpressions:":["col 
6:string"],"className:":"VectorMapJoinOperator","native:":"false","nativeConditionsMet:":["hive.mapjoin.optimized.hashtable
 IS true","hive.vectorized.execution.mapjoin.native.enabled IS true","One 
MapJoin Condition IS true","No nullsafe IS true","Small table vectorizes IS 
true","Outer Join has keys IS true","Optimized Table and Supports Key Types IS 
true"],"nativeConditionsNotMet:":["hive.execution.engine mr IN [tez, spark] IS 
false"]},"outputColumnNames:":["_col
 0"],"Statistics:":"Num rows: 22 Data size: 4840 Basic stats: COMPLETE Column 
stats: NONE","OperatorId:":"MAPJOIN_29","children":{"Map Join 
Operator":{"condition map:":[{"":"Left Outer Join 0 to 1"}],"keys:":{"0":"_col0 
(type: string)","1":"_col0 (type: string)"},"Map Join 
Vectorization:":{"bigTableKeyExpressions:":["col 
0:string"],"className:":"VectorMapJoinOperator","native:":"false","nativeConditionsMet:":["hive.mapjoin.optimized.hashtable
 IS true","hive.vectorized.execution.mapjoin.native.enabled IS true","One 
MapJoin Condition IS true","No nullsafe IS true","Small table vectorizes IS 
true","Outer Join has keys IS true","Optimized Table and Supports Key Types IS 
true"],"nativeConditionsNotMet:":["hive.execution.engine mr IN [tez, spark] IS 
false"]},"Statistics:":"Num rows: 24 Data size: 5324 Basic stats: COMPLETE 
Column stats: NONE","OperatorId:":"MAPJOIN_30","children":{"Group By 
Operator":{"aggregations:":["count()"],"Group By 
Vectorization:":{"aggregators:":["VectorUDAFCountSt
 ar(*) -> 
bigint"],"className:":"VectorGroupByOperator","groupByMode:":"HASH","native:":"false","vectorProcessingMode:":"HASH","projectedOutputColumnNums:":"[0]"},"mode:":"hash","outputColumnNames:":["_col0"],"Statistics:":"Num
 rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"GBY_31","children":{"Reduce Output 
Operator":{"columnExprMap:":{"VALUE._col0":"_col0"},"sort order:":"","Reduce 
Sink 
Vectorization:":{"className:":"VectorReduceSinkOperator","native:":"false","nativeConditionsMet:":["hive.vectorized.execution.reducesink.new.enabled
 IS true","No PTF TopN IS true","No DISTINCT columns IS 
true","BinarySortableSerDe for keys IS true","LazyBinarySerDe for values IS 
true"],"nativeConditionsNotMet:":["hive.execution.engine mr IN [tez, spark] IS 
false"]},"Statistics:":"Num rows: 1 Data size: 8 Basic stats: COMPLETE Column 
stats: NONE","value expressions:":"_col0 (type: 
bigint)","OperatorId:":"RS_32"}}}}}}}}}}}}],"Execution mode:":"vectorized","Map 
Vectorizat
 
ion:":{"enabled:":"true","enabledConditionsMet:":["hive.vectorized.use.vectorized.input.format
 IS 
true"],"inputFormatFeatureSupport:":"[DECIMAL_64]","featureSupportInUse:":"[DECIMAL_64]","inputFileFormats:":["org.apache.hadoop.hive.ql.io.orc.OrcInputFormat"],"allNative:":"false","usesVectorUDFAdaptor:":"false","vectorized:":"true","rowBatchContext:":{"dataColumnCount:":"12","includeColumns:":"[6,
 
7]","dataColumns:":["ctinyint:tinyint","csmallint:smallint","cint:int","cbigint:bigint","cfloat:float","cdouble:double","cstring1:string","cstring2:string","ctimestamp1:timestamp","ctimestamp2:timestamp","cboolean1:boolean","cboolean2:boolean"],"partitionColumnCount:":"0","scratchColumnTypeNames:":"[]"}},"Local
 Work:":{"Map Reduce Local Work":{}},"Reduce 
Vectorization:":{"enabled:":"false","enableConditionsMet:":["hive.vectorized.execution.reduce.enabled
 IS true"],"enableConditionsNotMet:":["hive.execution.engine mr IN [tez, spark] 
IS false"]},"Reduce Operator Tree:":{"Group By Operator":{"
 
aggregations:":["count(VALUE._col0)"],"mode:":"mergepartial","outputColumnNames:":["_col0"],"Statistics:":"Num
 rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"GBY_15","children":{"File Output 
Operator":{"compressed:":"false","Statistics:":"Num rows: 1 Data size: 8 Basic 
stats: COMPLETE Column stats: NONE","table:":{"input 
format:":"org.apache.hadoop.mapred.SequenceFileInputFormat","output 
format:":"org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"},"OperatorId:":"FS_17"}}}}}},"Stage-0":{"Fetch
 Operator":{"limit:":"-1","Processor 
Tree:":{"ListSink":{"OperatorId:":"LIST_SINK_33"}}}}}}
 PREHOOK: query: select count(*) from (select c.cstring1
 from small_alltypesorc_a_n1 c
 left outer join small_alltypesorc_a_n1 cd
@@ -324,7 +324,7 @@ left outer join small_alltypesorc_a_n1 hd
   on hd.cstring1 = c.cstring1 and hd.cint = c.cint
 ) t1
 POSTHOOK: type: QUERY
-{"optimizedSQL":"SELECT COUNT(*) AS `$f0`\nFROM (SELECT `cint`, `cbigint`, 
`cstring1`, `cstring2`\nFROM `default`.`small_alltypesorc_a_n1`) AS `t`\nLEFT 
JOIN (SELECT `cbigint`, `cstring2`\nFROM `default`.`small_alltypesorc_a_n1`) AS 
`t0` ON `t`.`cstring2` = `t0`.`cstring2` AND `t`.`cbigint` = 
`t0`.`cbigint`\nLEFT JOIN (SELECT `cint`, `cstring1`\nFROM 
`default`.`small_alltypesorc_a_n1`) AS `t1` ON `t`.`cstring1` = `t1`.`cstring1` 
AND `t`.`cint` = `t1`.`cint`","PLAN 
VECTORIZATION":{"enabled":true,"enabledConditionsMet":["hive.vectorized.execution.enabled
 IS true"]},"STAGE DEPENDENCIES":{"Stage-8":{"ROOT 
STAGE":"TRUE"},"Stage-3":{"DEPENDENT STAGES":"Stage-8"},"Stage-0":{"DEPENDENT 
STAGES":"Stage-3"}},"STAGE PLANS":{"Stage-8":{"Map Reduce Local Work":{"Alias 
-> Map Local Tables:":{"$hdt$_1:cd":{"Fetch 
Operator":{"limit:":"-1"}},"$hdt$_2:hd":{"Fetch 
Operator":{"limit:":"-1"}}},"Alias -> Map Local Operator 
Tree:":{"$hdt$_1:cd":{"TableScan":{"alias:":"cd","columns:":["cbigint","cstring2"],
 "database:":"default","Statistics:":"Num rows: 20 Data size: 4400 Basic stats: 
COMPLETE Column stats: 
NONE","table:":"small_alltypesorc_a_n1","isTempTable:":"false","OperatorId:":"TS_2","children":{"Select
 Operator":{"expressions:":"cbigint (type: bigint), cstring2 (type: 
string)","columnExprMap:":{"_col0":"cbigint","_col1":"cstring2"},"outputColumnNames:":["_col0","_col1"],"Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"SEL_3","children":{"HashTable Sink 
Operator":{"keys:":{"0":"_col1 (type: bigint), _col3 (type: string)","1":"_col0 
(type: bigint), _col1 (type: 
string)"},"OperatorId:":"HASHTABLESINK_26"}}}}}},"$hdt$_2:hd":{"TableScan":{"alias:":"hd","columns:":["cint","cstring1"],"database:":"default","Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","table:":"small_alltypesorc_a_n1","isTempTable:":"false","OperatorId:":"TS_4","children":{"Select
 Operator":{"expressions:":"cint (type: int), cst
 ring1 (type: 
string)","columnExprMap:":{"_col0":"cint","_col1":"cstring1"},"outputColumnNames:":["_col0","_col1"],"Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"SEL_5","children":{"HashTable Sink 
Operator":{"keys:":{"0":"_col0 (type: int), _col2 (type: string)","1":"_col0 
(type: int), _col1 (type: 
string)"},"OperatorId:":"HASHTABLESINK_24"}}}}}}}}},"Stage-3":{"Map 
Reduce":{"Map Operator 
Tree:":[{"TableScan":{"alias:":"c","columns:":["cint","cbigint","cstring1","cstring2"],"database:":"default","Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","table:":"small_alltypesorc_a_n1","TableScan 
Vectorization:":{"native:":"true","vectorizationSchemaColumns:":"[0:ctinyint:tinyint,
 1:csmallint:smallint, 2:cint:int, 3:cbigint:bigint, 4:cfloat:float, 
5:cdouble:double, 6:cstring1:string, 7:cstring2:string, 
8:ctimestamp1:timestamp, 9:ctimestamp2:timestamp, 10:cboolean1:boolean, 
11:cboolean2:boolean, 12:ROW__I
 
D:struct<writeid:bigint,bucketid:int,rowid:bigint>]"},"isTempTable:":"false","OperatorId:":"TS_0","children":{"Select
 Operator":{"expressions:":"cint (type: int), cbigint (type: bigint), cstring1 
(type: string), cstring2 (type: 
string)","columnExprMap:":{"_col0":"cint","_col1":"cbigint","_col2":"cstring1","_col3":"cstring2"},"outputColumnNames:":["_col0","_col1","_col2","_col3"],"Select
 
Vectorization:":{"className:":"VectorSelectOperator","native:":"true","projectedOutputColumnNums:":"[2,
 3, 6, 7]"},"Statistics:":"Num rows: 20 Data size: 4400 Basic stats: COMPLETE 
Column stats: NONE","OperatorId:":"SEL_28","children":{"Map Join 
Operator":{"columnExprMap:":{"_col0":"0:_col0","_col2":"0:_col2"},"condition 
map:":[{"":"Left Outer Join 0 to 1"}],"keys:":{"0":"_col1 (type: bigint), _col3 
(type: string)","1":"_col0 (type: bigint), _col1 (type: string)"},"Map Join 
Vectorization:":{"bigTableKeyExpressions:":["col 3:bigint","col 
7:string"],"bigTableValueExpressions:":["col 2:int","col 6:strin
 
g"],"className:":"VectorMapJoinOperator","native:":"false","nativeConditionsMet:":["hive.mapjoin.optimized.hashtable
 IS true","hive.vectorized.execution.mapjoin.native.enabled IS true","One 
MapJoin Condition IS true","No nullsafe IS true","Small table vectorizes IS 
true","Outer Join has keys IS true","Optimized Table and Supports Key Types IS 
true"],"nativeConditionsNotMet:":["hive.execution.engine mr IN [tez, spark] IS 
false"]},"outputColumnNames:":["_col0","_col2"],"Statistics:":"Num rows: 22 
Data size: 4840 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"MAPJOIN_29","children":{"Map Join Operator":{"condition 
map:":[{"":"Left Outer Join 0 to 1"}],"keys:":{"0":"_col0 (type: int), _col2 
(type: string)","1":"_col0 (type: int), _col1 (type: string)"},"Map Join 
Vectorization:":{"bigTableKeyExpressions:":["col 0:int","col 
1:string"],"className:":"VectorMapJoinOperator","native:":"false","nativeConditionsMet:":["hive.mapjoin.optimized.hashtable
 IS true","hive.vectorized.executi
 on.mapjoin.native.enabled IS true","One MapJoin Condition IS true","No 
nullsafe IS true","Small table vectorizes IS true","Outer Join has keys IS 
true","Optimized Table and Supports Key Types IS 
true"],"nativeConditionsNotMet:":["hive.execution.engine mr IN [tez, spark] IS 
false"]},"Statistics:":"Num rows: 24 Data size: 5324 Basic stats: COMPLETE 
Column stats: NONE","OperatorId:":"MAPJOIN_30","children":{"Group By 
Operator":{"aggregations:":["count()"],"Group By 
Vectorization:":{"aggregators:":["VectorUDAFCountStar(*) -> 
bigint"],"className:":"VectorGroupByOperator","groupByMode:":"HASH","native:":"false","vectorProcessingMode:":"HASH","projectedOutputColumnNums:":"[0]"},"mode:":"hash","outputColumnNames:":["_col0"],"Statistics:":"Num
 rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"GBY_31","children":{"Reduce Output 
Operator":{"columnExprMap:":{"VALUE._col0":"_col0"},"sort order:":"","Reduce 
Sink Vectorization:":{"className:":"VectorReduceSinkOperator",
 
"native:":"false","nativeConditionsMet:":["hive.vectorized.execution.reducesink.new.enabled
 IS true","No PTF TopN IS true","No DISTINCT columns IS 
true","BinarySortableSerDe for keys IS true","LazyBinarySerDe for values IS 
true"],"nativeConditionsNotMet:":["hive.execution.engine mr IN [tez, spark] IS 
false"]},"Statistics:":"Num rows: 1 Data size: 8 Basic stats: COMPLETE Column 
stats: NONE","value expressions:":"_col0 (type: 
bigint)","OperatorId:":"RS_32"}}}}}}}}}}}}],"Execution mode:":"vectorized","Map 
Vectorization:":{"enabled:":"true","enabledConditionsMet:":["hive.vectorized.use.vectorized.input.format
 IS 
true"],"inputFormatFeatureSupport:":"[DECIMAL_64]","featureSupportInUse:":"[DECIMAL_64]","inputFileFormats:":["org.apache.hadoop.hive.ql.io.orc.OrcInputFormat"],"allNative:":"false","usesVectorUDFAdaptor:":"false","vectorized:":"true","rowBatchContext:":{"dataColumnCount:":"12","includeColumns:":"[2,
 3, 6, 7]","dataColumns:":["ctinyint:tinyint","csmallint:smallint","cint:int","c
 
bigint:bigint","cfloat:float","cdouble:double","cstring1:string","cstring2:string","ctimestamp1:timestamp","ctimestamp2:timestamp","cboolean1:boolean","cboolean2:boolean"],"partitionColumnCount:":"0","scratchColumnTypeNames:":"[]"}},"Local
 Work:":{"Map Reduce Local Work":{}},"Reduce 
Vectorization:":{"enabled:":"false","enableConditionsMet:":["hive.vectorized.execution.reduce.enabled
 IS true"],"enableConditionsNotMet:":["hive.execution.engine mr IN [tez, spark] 
IS false"]},"Reduce Operator Tree:":{"Group By 
Operator":{"aggregations:":["count(VALUE._col0)"],"mode:":"mergepartial","outputColumnNames:":["_col0"],"Statistics:":"Num
 rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"GBY_15","children":{"File Output 
Operator":{"compressed:":"false","Statistics:":"Num rows: 1 Data size: 8 Basic 
stats: COMPLETE Column stats: NONE","table:":{"input 
format:":"org.apache.hadoop.mapred.SequenceFileInputFormat","output 
format:":"org.apache.hadoop.hive.ql.io.HiveSequence
 
FileOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"},"OperatorId:":"FS_17"}}}}}},"Stage-0":{"Fetch
 Operator":{"limit:":"-1","Processor 
Tree:":{"ListSink":{"OperatorId:":"LIST_SINK_33"}}}}}}
+{"optimizedSQL":"SELECT COUNT(*) AS `$f0`\nFROM (SELECT `cint`, `cbigint`, 
`cstring1`, `cstring2`\nFROM `default`.`small_alltypesorc_a_n1`) AS `t`\nLEFT 
JOIN (SELECT `cbigint`, `cstring2`\nFROM `default`.`small_alltypesorc_a_n1`) AS 
`t0` ON `t`.`cstring2` = `t0`.`cstring2` AND `t`.`cbigint` = 
`t0`.`cbigint`\nLEFT JOIN (SELECT `cint`, `cstring1`\nFROM 
`default`.`small_alltypesorc_a_n1`) AS `t1` ON `t`.`cstring1` = `t1`.`cstring1` 
AND `t`.`cint` = `t1`.`cint`","PLAN 
VECTORIZATION":{"enabled":true,"enabledConditionsMet":["hive.vectorized.execution.enabled
 IS true"]},"cboInfo":"Plan optimized by CBO.","STAGE 
DEPENDENCIES":{"Stage-8":{"ROOT STAGE":"TRUE"},"Stage-3":{"DEPENDENT 
STAGES":"Stage-8"},"Stage-0":{"DEPENDENT STAGES":"Stage-3"}},"STAGE 
PLANS":{"Stage-8":{"Map Reduce Local Work":{"Alias -> Map Local 
Tables:":{"$hdt$_1:cd":{"Fetch Operator":{"limit:":"-1"}},"$hdt$_2:hd":{"Fetch 
Operator":{"limit:":"-1"}}},"Alias -> Map Local Operator 
Tree:":{"$hdt$_1:cd":{"TableScan":{"alias:":"cd"
 ,"columns:":["cbigint","cstring2"],"database:":"default","Statistics:":"Num 
rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","table:":"small_alltypesorc_a_n1","isTempTable:":"false","OperatorId:":"TS_2","children":{"Select
 Operator":{"expressions:":"cbigint (type: bigint), cstring2 (type: 
string)","columnExprMap:":{"_col0":"cbigint","_col1":"cstring2"},"outputColumnNames:":["_col0","_col1"],"Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"SEL_3","children":{"HashTable Sink 
Operator":{"keys:":{"0":"_col1 (type: bigint), _col3 (type: string)","1":"_col0 
(type: bigint), _col1 (type: 
string)"},"OperatorId:":"HASHTABLESINK_26"}}}}}},"$hdt$_2:hd":{"TableScan":{"alias:":"hd","columns:":["cint","cstring1"],"database:":"default","Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","table:":"small_alltypesorc_a_n1","isTempTable:":"false","OperatorId:":"TS_4","children":{"Select
 Operator":{"e
 xpressions:":"cint (type: int), cstring1 (type: 
string)","columnExprMap:":{"_col0":"cint","_col1":"cstring1"},"outputColumnNames:":["_col0","_col1"],"Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"SEL_5","children":{"HashTable Sink 
Operator":{"keys:":{"0":"_col0 (type: int), _col2 (type: string)","1":"_col0 
(type: int), _col1 (type: 
string)"},"OperatorId:":"HASHTABLESINK_24"}}}}}}}}},"Stage-3":{"Map 
Reduce":{"Map Operator 
Tree:":[{"TableScan":{"alias:":"c","columns:":["cint","cbigint","cstring1","cstring2"],"database:":"default","Statistics:":"Num
 rows: 20 Data size: 4400 Basic stats: COMPLETE Column stats: 
NONE","table:":"small_alltypesorc_a_n1","TableScan 
Vectorization:":{"native:":"true","vectorizationSchemaColumns:":"[0:ctinyint:tinyint,
 1:csmallint:smallint, 2:cint:int, 3:cbigint:bigint, 4:cfloat:float, 
5:cdouble:double, 6:cstring1:string, 7:cstring2:string, 
8:ctimestamp1:timestamp, 9:ctimestamp2:timestamp, 10:cboolean1:boole
 an, 11:cboolean2:boolean, 
12:ROW__ID:struct<writeid:bigint,bucketid:int,rowid:bigint>]"},"isTempTable:":"false","OperatorId:":"TS_0","children":{"Select
 Operator":{"expressions:":"cint (type: int), cbigint (type: bigint), cstring1 
(type: string), cstring2 (type: 
string)","columnExprMap:":{"_col0":"cint","_col1":"cbigint","_col2":"cstring1","_col3":"cstring2"},"outputColumnNames:":["_col0","_col1","_col2","_col3"],"Select
 
Vectorization:":{"className:":"VectorSelectOperator","native:":"true","projectedOutputColumnNums:":"[2,
 3, 6, 7]"},"Statistics:":"Num rows: 20 Data size: 4400 Basic stats: COMPLETE 
Column stats: NONE","OperatorId:":"SEL_28","children":{"Map Join 
Operator":{"columnExprMap:":{"_col0":"0:_col0","_col2":"0:_col2"},"condition 
map:":[{"":"Left Outer Join 0 to 1"}],"keys:":{"0":"_col1 (type: bigint), _col3 
(type: string)","1":"_col0 (type: bigint), _col1 (type: string)"},"Map Join 
Vectorization:":{"bigTableKeyExpressions:":["col 3:bigint","col 
7:string"],"bigTableValueExpr
 essions:":["col 2:int","col 
6:string"],"className:":"VectorMapJoinOperator","native:":"false","nativeConditionsMet:":["hive.mapjoin.optimized.hashtable
 IS true","hive.vectorized.execution.mapjoin.native.enabled IS true","One 
MapJoin Condition IS true","No nullsafe IS true","Small table vectorizes IS 
true","Outer Join has keys IS true","Optimized Table and Supports Key Types IS 
true"],"nativeConditionsNotMet:":["hive.execution.engine mr IN [tez, spark] IS 
false"]},"outputColumnNames:":["_col0","_col2"],"Statistics:":"Num rows: 22 
Data size: 4840 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"MAPJOIN_29","children":{"Map Join Operator":{"condition 
map:":[{"":"Left Outer Join 0 to 1"}],"keys:":{"0":"_col0 (type: int), _col2 
(type: string)","1":"_col0 (type: int), _col1 (type: string)"},"Map Join 
Vectorization:":{"bigTableKeyExpressions:":["col 0:int","col 
1:string"],"className:":"VectorMapJoinOperator","native:":"false","nativeConditionsMet:":["hive.mapjoin.optimized.hashtabl
 e IS true","hive.vectorized.execution.mapjoin.native.enabled IS true","One 
MapJoin Condition IS true","No nullsafe IS true","Small table vectorizes IS 
true","Outer Join has keys IS true","Optimized Table and Supports Key Types IS 
true"],"nativeConditionsNotMet:":["hive.execution.engine mr IN [tez, spark] IS 
false"]},"Statistics:":"Num rows: 24 Data size: 5324 Basic stats: COMPLETE 
Column stats: NONE","OperatorId:":"MAPJOIN_30","children":{"Group By 
Operator":{"aggregations:":["count()"],"Group By 
Vectorization:":{"aggregators:":["VectorUDAFCountStar(*) -> 
bigint"],"className:":"VectorGroupByOperator","groupByMode:":"HASH","native:":"false","vectorProcessingMode:":"HASH","projectedOutputColumnNums:":"[0]"},"mode:":"hash","outputColumnNames:":["_col0"],"Statistics:":"Num
 rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"GBY_31","children":{"Reduce Output 
Operator":{"columnExprMap:":{"VALUE._col0":"_col0"},"sort order:":"","Reduce 
Sink Vectorization:":{"clas
 
sName:":"VectorReduceSinkOperator","native:":"false","nativeConditionsMet:":["hive.vectorized.execution.reducesink.new.enabled
 IS true","No PTF TopN IS true","No DISTINCT columns IS 
true","BinarySortableSerDe for keys IS true","LazyBinarySerDe for values IS 
true"],"nativeConditionsNotMet:":["hive.execution.engine mr IN [tez, spark] IS 
false"]},"Statistics:":"Num rows: 1 Data size: 8 Basic stats: COMPLETE Column 
stats: NONE","value expressions:":"_col0 (type: 
bigint)","OperatorId:":"RS_32"}}}}}}}}}}}}],"Execution mode:":"vectorized","Map 
Vectorization:":{"enabled:":"true","enabledConditionsMet:":["hive.vectorized.use.vectorized.input.format
 IS 
true"],"inputFormatFeatureSupport:":"[DECIMAL_64]","featureSupportInUse:":"[DECIMAL_64]","inputFileFormats:":["org.apache.hadoop.hive.ql.io.orc.OrcInputFormat"],"allNative:":"false","usesVectorUDFAdaptor:":"false","vectorized:":"true","rowBatchContext:":{"dataColumnCount:":"12","includeColumns:":"[2,
 3, 6, 7]","dataColumns:":["ctinyint:tinyint"
 
,"csmallint:smallint","cint:int","cbigint:bigint","cfloat:float","cdouble:double","cstring1:string","cstring2:string","ctimestamp1:timestamp","ctimestamp2:timestamp","cboolean1:boolean","cboolean2:boolean"],"partitionColumnCount:":"0","scratchColumnTypeNames:":"[]"}},"Local
 Work:":{"Map Reduce Local Work":{}},"Reduce 
Vectorization:":{"enabled:":"false","enableConditionsMet:":["hive.vectorized.execution.reduce.enabled
 IS true"],"enableConditionsNotMet:":["hive.execution.engine mr IN [tez, spark] 
IS false"]},"Reduce Operator Tree:":{"Group By 
Operator":{"aggregations:":["count(VALUE._col0)"],"mode:":"mergepartial","outputColumnNames:":["_col0"],"Statistics:":"Num
 rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: 
NONE","OperatorId:":"GBY_15","children":{"File Output 
Operator":{"compressed:":"false","Statistics:":"Num rows: 1 Data size: 8 Basic 
stats: COMPLETE Column stats: NONE","table:":{"input 
format:":"org.apache.hadoop.mapred.SequenceFileInputFormat","output 
format:":"org.ap
 
ache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"},"OperatorId:":"FS_17"}}}}}},"Stage-0":{"Fetch
 Operator":{"limit:":"-1","Processor 
Tree:":{"ListSink":{"OperatorId:":"LIST_SINK_33"}}}}}}
 PREHOOK: query: select count(*) from (select c.cstring1
 from small_alltypesorc_a_n1 c
 left outer join small_alltypesorc_a_n1 cd

Reply via email to