hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhbut...@apache.org
Subject svn commit: r1543120 [9/16] - in /hive/trunk: common/src/java/org/apache/hadoop/hive/conf/ data/files/ ql/src/java/org/apache/hadoop/hive/ql/ ql/src/java/org/apache/hadoop/hive/ql/exec/ ql/src/java/org/apache/hadoop/hive/ql/optimizer/ ql/src/java/org/a...
Date Mon, 18 Nov 2013 19:29:27 GMT
Added: hive/trunk/ql/src/test/results/clientpositive/annotate_stats_table.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/annotate_stats_table.q.out?rev=1543120&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/annotate_stats_table.q.out (added)
+++ hive/trunk/ql/src/test/results/clientpositive/annotate_stats_table.q.out Mon Nov 18 19:29:24 2013
@@ -0,0 +1,698 @@
+PREHOOK: query: create table if not exists emp_staging (
+  lastname string,
+  deptid int
+) row format delimited fields terminated by '|' stored as textfile
+PREHOOK: type: CREATETABLE
+POSTHOOK: query: create table if not exists emp_staging (
+  lastname string,
+  deptid int
+) row format delimited fields terminated by '|' stored as textfile
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: default@emp_staging
+PREHOOK: query: create table if not exists emp_orc like emp_staging
+PREHOOK: type: CREATETABLE
+POSTHOOK: query: create table if not exists emp_orc like emp_staging
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: default@emp_orc
+PREHOOK: query: alter table emp_orc set fileformat orc
+PREHOOK: type: ALTERTABLE_FILEFORMAT
+PREHOOK: Input: default@emp_orc
+PREHOOK: Output: default@emp_orc
+POSTHOOK: query: alter table emp_orc set fileformat orc
+POSTHOOK: type: ALTERTABLE_FILEFORMAT
+POSTHOOK: Input: default@emp_orc
+POSTHOOK: Output: default@emp_orc
+PREHOOK: query: -- basicStatState: NONE colStatState: NONE
+explain extended select * from emp_orc
+PREHOOK: type: QUERY
+POSTHOOK: query: -- basicStatState: NONE colStatState: NONE
+explain extended select * from emp_orc
+POSTHOOK: type: QUERY
+ABSTRACT SYNTAX TREE:
+  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME emp_orc))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF))))
+
+STAGE DEPENDENCIES:
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        TableScan
+          alias: emp_orc
+          Statistics:
+              numRows: 0 dataSize: 0 basicStatsState: NONE colStatsState: NONE
+          GatherStats: false
+          Select Operator
+            expressions:
+                  expr: lastname
+                  type: string
+                  expr: deptid
+                  type: int
+            outputColumnNames: _col0, _col1
+            Statistics:
+                numRows: 0 dataSize: 0 basicStatsState: NONE colStatsState: NONE
+            ListSink
+
+
+PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/emp.txt' OVERWRITE INTO TABLE emp_staging
+PREHOOK: type: LOAD
+PREHOOK: Output: default@emp_staging
+POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/emp.txt' OVERWRITE INTO TABLE emp_staging
+POSTHOOK: type: LOAD
+POSTHOOK: Output: default@emp_staging
+PREHOOK: query: insert overwrite table emp_orc select * from emp_staging
+PREHOOK: type: QUERY
+PREHOOK: Input: default@emp_staging
+PREHOOK: Output: default@emp_orc
+POSTHOOK: query: insert overwrite table emp_orc select * from emp_staging
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@emp_staging
+POSTHOOK: Output: default@emp_orc
+POSTHOOK: Lineage: emp_orc.deptid SIMPLE [(emp_staging)emp_staging.FieldSchema(name:deptid, type:int, comment:null), ]
+POSTHOOK: Lineage: emp_orc.lastname SIMPLE [(emp_staging)emp_staging.FieldSchema(name:lastname, type:string, comment:null), ]
+PREHOOK: query: -- stats are disabled. basic stats will report the file size but not raw data size. so initial statistics will be PARTIAL
+
+-- basicStatState: PARTIAL colStatState: NONE
+explain extended select * from emp_orc
+PREHOOK: type: QUERY
+POSTHOOK: query: -- stats are disabled. basic stats will report the file size but not raw data size. so initial statistics will be PARTIAL
+
+-- basicStatState: PARTIAL colStatState: NONE
+explain extended select * from emp_orc
+POSTHOOK: type: QUERY
+POSTHOOK: Lineage: emp_orc.deptid SIMPLE [(emp_staging)emp_staging.FieldSchema(name:deptid, type:int, comment:null), ]
+POSTHOOK: Lineage: emp_orc.lastname SIMPLE [(emp_staging)emp_staging.FieldSchema(name:lastname, type:string, comment:null), ]
+ABSTRACT SYNTAX TREE:
+  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME emp_orc))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF))))
+
+STAGE DEPENDENCIES:
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        TableScan
+          alias: emp_orc
+          Statistics:
+              numRows: 0 dataSize: 349 basicStatsState: PARTIAL colStatsState: NONE
+          GatherStats: false
+          Select Operator
+            expressions:
+                  expr: lastname
+                  type: string
+                  expr: deptid
+                  type: int
+            outputColumnNames: _col0, _col1
+            Statistics:
+                numRows: 0 dataSize: 349 basicStatsState: PARTIAL colStatsState: NONE
+            ListSink
+
+
+PREHOOK: query: -- table level analyze statistics
+analyze table emp_orc compute statistics
+PREHOOK: type: QUERY
+PREHOOK: Input: default@emp_orc
+PREHOOK: Output: default@emp_orc
+POSTHOOK: query: -- table level analyze statistics
+analyze table emp_orc compute statistics
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@emp_orc
+POSTHOOK: Output: default@emp_orc
+POSTHOOK: Lineage: emp_orc.deptid SIMPLE [(emp_staging)emp_staging.FieldSchema(name:deptid, type:int, comment:null), ]
+POSTHOOK: Lineage: emp_orc.lastname SIMPLE [(emp_staging)emp_staging.FieldSchema(name:lastname, type:string, comment:null), ]
+PREHOOK: query: -- basicStatState: COMPLETE colStatState: NONE
+explain extended select * from emp_orc
+PREHOOK: type: QUERY
+POSTHOOK: query: -- basicStatState: COMPLETE colStatState: NONE
+explain extended select * from emp_orc
+POSTHOOK: type: QUERY
+POSTHOOK: Lineage: emp_orc.deptid SIMPLE [(emp_staging)emp_staging.FieldSchema(name:deptid, type:int, comment:null), ]
+POSTHOOK: Lineage: emp_orc.lastname SIMPLE [(emp_staging)emp_staging.FieldSchema(name:lastname, type:string, comment:null), ]
+ABSTRACT SYNTAX TREE:
+  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME emp_orc))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF))))
+
+STAGE DEPENDENCIES:
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        TableScan
+          alias: emp_orc
+          Statistics:
+              numRows: 6 dataSize: 349 basicStatsState: COMPLETE colStatsState: NONE
+          GatherStats: false
+          Select Operator
+            expressions:
+                  expr: lastname
+                  type: string
+                  expr: deptid
+                  type: int
+            outputColumnNames: _col0, _col1
+            Statistics:
+                numRows: 6 dataSize: 349 basicStatsState: COMPLETE colStatsState: NONE
+            ListSink
+
+
+PREHOOK: query: -- column level partial statistics
+analyze table emp_orc compute statistics for columns deptid
+PREHOOK: type: QUERY
+PREHOOK: Input: default@emp_orc
+#### A masked pattern was here ####
+POSTHOOK: query: -- column level partial statistics
+analyze table emp_orc compute statistics for columns deptid
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@emp_orc
+#### A masked pattern was here ####
+POSTHOOK: Lineage: emp_orc.deptid SIMPLE [(emp_staging)emp_staging.FieldSchema(name:deptid, type:int, comment:null), ]
+POSTHOOK: Lineage: emp_orc.lastname SIMPLE [(emp_staging)emp_staging.FieldSchema(name:lastname, type:string, comment:null), ]
+PREHOOK: query: -- basicStatState: COMPLETE colStatState: PARTIAL
+explain extended select * from emp_orc
+PREHOOK: type: QUERY
+POSTHOOK: query: -- basicStatState: COMPLETE colStatState: PARTIAL
+explain extended select * from emp_orc
+POSTHOOK: type: QUERY
+POSTHOOK: Lineage: emp_orc.deptid SIMPLE [(emp_staging)emp_staging.FieldSchema(name:deptid, type:int, comment:null), ]
+POSTHOOK: Lineage: emp_orc.lastname SIMPLE [(emp_staging)emp_staging.FieldSchema(name:lastname, type:string, comment:null), ]
+ABSTRACT SYNTAX TREE:
+  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME emp_orc))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF))))
+
+STAGE DEPENDENCIES:
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        TableScan
+          alias: emp_orc
+          Statistics:
+              numRows: 6 dataSize: 349 basicStatsState: COMPLETE colStatsState: PARTIAL
+          GatherStats: false
+          Select Operator
+            expressions:
+                  expr: lastname
+                  type: string
+                  expr: deptid
+                  type: int
+            outputColumnNames: _col0, _col1
+            Statistics:
+                numRows: 6 dataSize: 349 basicStatsState: COMPLETE colStatsState: PARTIAL
+            ListSink
+
+
+PREHOOK: query: -- all selected columns have statistics
+-- basicStatState: COMPLETE colStatState: COMPLETE
+explain extended select deptid from emp_orc
+PREHOOK: type: QUERY
+POSTHOOK: query: -- all selected columns have statistics
+-- basicStatState: COMPLETE colStatState: COMPLETE
+explain extended select deptid from emp_orc
+POSTHOOK: type: QUERY
+POSTHOOK: Lineage: emp_orc.deptid SIMPLE [(emp_staging)emp_staging.FieldSchema(name:deptid, type:int, comment:null), ]
+POSTHOOK: Lineage: emp_orc.lastname SIMPLE [(emp_staging)emp_staging.FieldSchema(name:lastname, type:string, comment:null), ]
+ABSTRACT SYNTAX TREE:
+  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME emp_orc))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL deptid)))))
+
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Alias -> Map Operator Tree:
+        emp_orc 
+          TableScan
+            alias: emp_orc
+            Statistics:
+                numRows: 6 dataSize: 349 basicStatsState: COMPLETE colStatsState: COMPLETE
+            GatherStats: false
+            Select Operator
+              expressions:
+                    expr: deptid
+                    type: int
+              outputColumnNames: _col0
+              Statistics:
+                  numRows: 6 dataSize: 20 basicStatsState: COMPLETE colStatsState: COMPLETE
+              File Output Operator
+                compressed: false
+                GlobalTableId: 0
+#### A masked pattern was here ####
+                NumFilesPerFileSink: 1
+                Statistics:
+                    numRows: 6 dataSize: 20 basicStatsState: COMPLETE colStatsState: COMPLETE
+#### A masked pattern was here ####
+                table:
+                    input format: org.apache.hadoop.mapred.TextInputFormat
+                    output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                    properties:
+                      columns _col0
+                      columns.types int
+                      escape.delim \
+                      hive.serialization.extend.nesting.levels true
+                      serialization.format 1
+                      serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                    serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                TotalFiles: 1
+                GatherStats: false
+                MultiFileSpray: false
+      Path -> Alias:
+#### A masked pattern was here ####
+      Path -> Partition:
+#### A masked pattern was here ####
+          Partition
+            base file name: emp_orc
+            input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+            output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
+            properties:
+              COLUMN_STATS_ACCURATE true
+              bucket_count -1
+              columns lastname,deptid
+              columns.types string:int
+              field.delim |
+#### A masked pattern was here ####
+              name default.emp_orc
+              numFiles 1
+              numRows 6
+              rawDataSize 0
+              serialization.ddl struct emp_orc { string lastname, i32 deptid}
+              serialization.format |
+              serialization.lib org.apache.hadoop.hive.ql.io.orc.OrcSerde
+              totalSize 349
+#### A masked pattern was here ####
+            serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
+          
+              input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+              output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
+              properties:
+                COLUMN_STATS_ACCURATE true
+                bucket_count -1
+                columns lastname,deptid
+                columns.types string:int
+                field.delim |
+#### A masked pattern was here ####
+                name default.emp_orc
+                numFiles 1
+                numRows 6
+                rawDataSize 0
+                serialization.ddl struct emp_orc { string lastname, i32 deptid}
+                serialization.format |
+                serialization.lib org.apache.hadoop.hive.ql.io.orc.OrcSerde
+                totalSize 349
+#### A masked pattern was here ####
+              serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
+              name: default.emp_orc
+            name: default.emp_orc
+      Truncated Path -> Alias:
+        /emp_orc [emp_orc]
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+
+
+PREHOOK: query: -- column level complete statistics
+analyze table emp_orc compute statistics for columns lastname,deptid
+PREHOOK: type: QUERY
+PREHOOK: Input: default@emp_orc
+#### A masked pattern was here ####
+POSTHOOK: query: -- column level complete statistics
+analyze table emp_orc compute statistics for columns lastname,deptid
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@emp_orc
+#### A masked pattern was here ####
+POSTHOOK: Lineage: emp_orc.deptid SIMPLE [(emp_staging)emp_staging.FieldSchema(name:deptid, type:int, comment:null), ]
+POSTHOOK: Lineage: emp_orc.lastname SIMPLE [(emp_staging)emp_staging.FieldSchema(name:lastname, type:string, comment:null), ]
+PREHOOK: query: -- basicStatState: COMPLETE colStatState: COMPLETE
+explain extended select * from emp_orc
+PREHOOK: type: QUERY
+POSTHOOK: query: -- basicStatState: COMPLETE colStatState: COMPLETE
+explain extended select * from emp_orc
+POSTHOOK: type: QUERY
+POSTHOOK: Lineage: emp_orc.deptid SIMPLE [(emp_staging)emp_staging.FieldSchema(name:deptid, type:int, comment:null), ]
+POSTHOOK: Lineage: emp_orc.lastname SIMPLE [(emp_staging)emp_staging.FieldSchema(name:lastname, type:string, comment:null), ]
+ABSTRACT SYNTAX TREE:
+  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME emp_orc))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF))))
+
+STAGE DEPENDENCIES:
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        TableScan
+          alias: emp_orc
+          Statistics:
+              numRows: 6 dataSize: 349 basicStatsState: COMPLETE colStatsState: COMPLETE
+          GatherStats: false
+          Select Operator
+            expressions:
+                  expr: lastname
+                  type: string
+                  expr: deptid
+                  type: int
+            outputColumnNames: _col0, _col1
+            Statistics:
+                numRows: 6 dataSize: 349 basicStatsState: COMPLETE colStatsState: COMPLETE
+            ListSink
+
+
+PREHOOK: query: -- basicStatState: COMPLETE colStatState: COMPLETE
+explain extended select lastname from emp_orc
+PREHOOK: type: QUERY
+POSTHOOK: query: -- basicStatState: COMPLETE colStatState: COMPLETE
+explain extended select lastname from emp_orc
+POSTHOOK: type: QUERY
+POSTHOOK: Lineage: emp_orc.deptid SIMPLE [(emp_staging)emp_staging.FieldSchema(name:deptid, type:int, comment:null), ]
+POSTHOOK: Lineage: emp_orc.lastname SIMPLE [(emp_staging)emp_staging.FieldSchema(name:lastname, type:string, comment:null), ]
+ABSTRACT SYNTAX TREE:
+  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME emp_orc))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL lastname)))))
+
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Alias -> Map Operator Tree:
+        emp_orc 
+          TableScan
+            alias: emp_orc
+            Statistics:
+                numRows: 6 dataSize: 349 basicStatsState: COMPLETE colStatsState: COMPLETE
+            GatherStats: false
+            Select Operator
+              expressions:
+                    expr: lastname
+                    type: string
+              outputColumnNames: _col0
+              Statistics:
+                  numRows: 6 dataSize: 546 basicStatsState: COMPLETE colStatsState: COMPLETE
+              File Output Operator
+                compressed: false
+                GlobalTableId: 0
+#### A masked pattern was here ####
+                NumFilesPerFileSink: 1
+                Statistics:
+                    numRows: 6 dataSize: 546 basicStatsState: COMPLETE colStatsState: COMPLETE
+#### A masked pattern was here ####
+                table:
+                    input format: org.apache.hadoop.mapred.TextInputFormat
+                    output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                    properties:
+                      columns _col0
+                      columns.types string
+                      escape.delim \
+                      hive.serialization.extend.nesting.levels true
+                      serialization.format 1
+                      serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                    serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                TotalFiles: 1
+                GatherStats: false
+                MultiFileSpray: false
+      Path -> Alias:
+#### A masked pattern was here ####
+      Path -> Partition:
+#### A masked pattern was here ####
+          Partition
+            base file name: emp_orc
+            input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+            output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
+            properties:
+              COLUMN_STATS_ACCURATE true
+              bucket_count -1
+              columns lastname,deptid
+              columns.types string:int
+              field.delim |
+#### A masked pattern was here ####
+              name default.emp_orc
+              numFiles 1
+              numRows 6
+              rawDataSize 0
+              serialization.ddl struct emp_orc { string lastname, i32 deptid}
+              serialization.format |
+              serialization.lib org.apache.hadoop.hive.ql.io.orc.OrcSerde
+              totalSize 349
+#### A masked pattern was here ####
+            serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
+          
+              input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+              output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
+              properties:
+                COLUMN_STATS_ACCURATE true
+                bucket_count -1
+                columns lastname,deptid
+                columns.types string:int
+                field.delim |
+#### A masked pattern was here ####
+                name default.emp_orc
+                numFiles 1
+                numRows 6
+                rawDataSize 0
+                serialization.ddl struct emp_orc { string lastname, i32 deptid}
+                serialization.format |
+                serialization.lib org.apache.hadoop.hive.ql.io.orc.OrcSerde
+                totalSize 349
+#### A masked pattern was here ####
+              serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
+              name: default.emp_orc
+            name: default.emp_orc
+      Truncated Path -> Alias:
+        /emp_orc [emp_orc]
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+
+
+PREHOOK: query: -- basicStatState: COMPLETE colStatState: COMPLETE
+explain extended select deptid from emp_orc
+PREHOOK: type: QUERY
+POSTHOOK: query: -- basicStatState: COMPLETE colStatState: COMPLETE
+explain extended select deptid from emp_orc
+POSTHOOK: type: QUERY
+POSTHOOK: Lineage: emp_orc.deptid SIMPLE [(emp_staging)emp_staging.FieldSchema(name:deptid, type:int, comment:null), ]
+POSTHOOK: Lineage: emp_orc.lastname SIMPLE [(emp_staging)emp_staging.FieldSchema(name:lastname, type:string, comment:null), ]
+ABSTRACT SYNTAX TREE:
+  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME emp_orc))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL deptid)))))
+
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Alias -> Map Operator Tree:
+        emp_orc 
+          TableScan
+            alias: emp_orc
+            Statistics:
+                numRows: 6 dataSize: 349 basicStatsState: COMPLETE colStatsState: COMPLETE
+            GatherStats: false
+            Select Operator
+              expressions:
+                    expr: deptid
+                    type: int
+              outputColumnNames: _col0
+              Statistics:
+                  numRows: 6 dataSize: 20 basicStatsState: COMPLETE colStatsState: COMPLETE
+              File Output Operator
+                compressed: false
+                GlobalTableId: 0
+#### A masked pattern was here ####
+                NumFilesPerFileSink: 1
+                Statistics:
+                    numRows: 6 dataSize: 20 basicStatsState: COMPLETE colStatsState: COMPLETE
+#### A masked pattern was here ####
+                table:
+                    input format: org.apache.hadoop.mapred.TextInputFormat
+                    output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                    properties:
+                      columns _col0
+                      columns.types int
+                      escape.delim \
+                      hive.serialization.extend.nesting.levels true
+                      serialization.format 1
+                      serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                    serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                TotalFiles: 1
+                GatherStats: false
+                MultiFileSpray: false
+      Path -> Alias:
+#### A masked pattern was here ####
+      Path -> Partition:
+#### A masked pattern was here ####
+          Partition
+            base file name: emp_orc
+            input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+            output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
+            properties:
+              COLUMN_STATS_ACCURATE true
+              bucket_count -1
+              columns lastname,deptid
+              columns.types string:int
+              field.delim |
+#### A masked pattern was here ####
+              name default.emp_orc
+              numFiles 1
+              numRows 6
+              rawDataSize 0
+              serialization.ddl struct emp_orc { string lastname, i32 deptid}
+              serialization.format |
+              serialization.lib org.apache.hadoop.hive.ql.io.orc.OrcSerde
+              totalSize 349
+#### A masked pattern was here ####
+            serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
+          
+              input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+              output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
+              properties:
+                COLUMN_STATS_ACCURATE true
+                bucket_count -1
+                columns lastname,deptid
+                columns.types string:int
+                field.delim |
+#### A masked pattern was here ####
+                name default.emp_orc
+                numFiles 1
+                numRows 6
+                rawDataSize 0
+                serialization.ddl struct emp_orc { string lastname, i32 deptid}
+                serialization.format |
+                serialization.lib org.apache.hadoop.hive.ql.io.orc.OrcSerde
+                totalSize 349
+#### A masked pattern was here ####
+              serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
+              name: default.emp_orc
+            name: default.emp_orc
+      Truncated Path -> Alias:
+        /emp_orc [emp_orc]
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+
+
+PREHOOK: query: -- basicStatState: COMPLETE colStatState: COMPLETE
+explain extended select lastname,deptid from emp_orc
+PREHOOK: type: QUERY
+POSTHOOK: query: -- basicStatState: COMPLETE colStatState: COMPLETE
+explain extended select lastname,deptid from emp_orc
+POSTHOOK: type: QUERY
+POSTHOOK: Lineage: emp_orc.deptid SIMPLE [(emp_staging)emp_staging.FieldSchema(name:deptid, type:int, comment:null), ]
+POSTHOOK: Lineage: emp_orc.lastname SIMPLE [(emp_staging)emp_staging.FieldSchema(name:lastname, type:string, comment:null), ]
+ABSTRACT SYNTAX TREE:
+  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME emp_orc))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL lastname)) (TOK_SELEXPR (TOK_TABLE_OR_COL deptid)))))
+
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Alias -> Map Operator Tree:
+        emp_orc 
+          TableScan
+            alias: emp_orc
+            Statistics:
+                numRows: 6 dataSize: 349 basicStatsState: COMPLETE colStatsState: COMPLETE
+            GatherStats: false
+            Select Operator
+              expressions:
+                    expr: lastname
+                    type: string
+                    expr: deptid
+                    type: int
+              outputColumnNames: _col0, _col1
+              Statistics:
+                  numRows: 6 dataSize: 566 basicStatsState: COMPLETE colStatsState: COMPLETE
+              File Output Operator
+                compressed: false
+                GlobalTableId: 0
+#### A masked pattern was here ####
+                NumFilesPerFileSink: 1
+                Statistics:
+                    numRows: 6 dataSize: 566 basicStatsState: COMPLETE colStatsState: COMPLETE
+#### A masked pattern was here ####
+                table:
+                    input format: org.apache.hadoop.mapred.TextInputFormat
+                    output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                    properties:
+                      columns _col0,_col1
+                      columns.types string:int
+                      escape.delim \
+                      hive.serialization.extend.nesting.levels true
+                      serialization.format 1
+                      serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                    serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                TotalFiles: 1
+                GatherStats: false
+                MultiFileSpray: false
+      Path -> Alias:
+#### A masked pattern was here ####
+      Path -> Partition:
+#### A masked pattern was here ####
+          Partition
+            base file name: emp_orc
+            input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+            output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
+            properties:
+              COLUMN_STATS_ACCURATE true
+              bucket_count -1
+              columns lastname,deptid
+              columns.types string:int
+              field.delim |
+#### A masked pattern was here ####
+              name default.emp_orc
+              numFiles 1
+              numRows 6
+              rawDataSize 0
+              serialization.ddl struct emp_orc { string lastname, i32 deptid}
+              serialization.format |
+              serialization.lib org.apache.hadoop.hive.ql.io.orc.OrcSerde
+              totalSize 349
+#### A masked pattern was here ####
+            serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
+          
+              input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+              output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
+              properties:
+                COLUMN_STATS_ACCURATE true
+                bucket_count -1
+                columns lastname,deptid
+                columns.types string:int
+                field.delim |
+#### A masked pattern was here ####
+                name default.emp_orc
+                numFiles 1
+                numRows 6
+                rawDataSize 0
+                serialization.ddl struct emp_orc { string lastname, i32 deptid}
+                serialization.format |
+                serialization.lib org.apache.hadoop.hive.ql.io.orc.OrcSerde
+                totalSize 349
+#### A masked pattern was here ####
+              serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
+              name: default.emp_orc
+            name: default.emp_orc
+      Truncated Path -> Alias:
+        /emp_orc [emp_orc]
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+
+

Added: hive/trunk/ql/src/test/results/clientpositive/annotate_stats_union.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/annotate_stats_union.q.out?rev=1543120&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/annotate_stats_union.q.out (added)
+++ hive/trunk/ql/src/test/results/clientpositive/annotate_stats_union.q.out Mon Nov 18 19:29:24 2013
@@ -0,0 +1,1127 @@
+PREHOOK: query: create table if not exists loc_staging (
+  state string,
+  locid int,
+  zip bigint,
+  year int
+) row format delimited fields terminated by '|' stored as textfile
+PREHOOK: type: CREATETABLE
+POSTHOOK: query: create table if not exists loc_staging (
+  state string,
+  locid int,
+  zip bigint,
+  year int
+) row format delimited fields terminated by '|' stored as textfile
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: default@loc_staging
+PREHOOK: query: create table loc_orc like loc_staging
+PREHOOK: type: CREATETABLE
+POSTHOOK: query: create table loc_orc like loc_staging
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: default@loc_orc
+PREHOOK: query: alter table loc_orc set fileformat orc
+PREHOOK: type: ALTERTABLE_FILEFORMAT
+PREHOOK: Input: default@loc_orc
+PREHOOK: Output: default@loc_orc
+POSTHOOK: query: alter table loc_orc set fileformat orc
+POSTHOOK: type: ALTERTABLE_FILEFORMAT
+POSTHOOK: Input: default@loc_orc
+POSTHOOK: Output: default@loc_orc
+PREHOOK: query: load data local inpath '../../data/files/loc.txt' overwrite into table loc_staging
+PREHOOK: type: LOAD
+PREHOOK: Output: default@loc_staging
+POSTHOOK: query: load data local inpath '../../data/files/loc.txt' overwrite into table loc_staging
+POSTHOOK: type: LOAD
+POSTHOOK: Output: default@loc_staging
+PREHOOK: query: insert overwrite table loc_orc select * from loc_staging
+PREHOOK: type: QUERY
+PREHOOK: Input: default@loc_staging
+PREHOOK: Output: default@loc_orc
+POSTHOOK: query: insert overwrite table loc_orc select * from loc_staging
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@loc_staging
+POSTHOOK: Output: default@loc_orc
+POSTHOOK: Lineage: loc_orc.locid SIMPLE [(loc_staging)loc_staging.FieldSchema(name:locid, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.state SIMPLE [(loc_staging)loc_staging.FieldSchema(name:state, type:string, comment:null), ]
+POSTHOOK: Lineage: loc_orc.year SIMPLE [(loc_staging)loc_staging.FieldSchema(name:year, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.zip SIMPLE [(loc_staging)loc_staging.FieldSchema(name:zip, type:bigint, comment:null), ]
+PREHOOK: query: analyze table loc_orc compute statistics for columns state,locid,zip,year
+PREHOOK: type: QUERY
+PREHOOK: Input: default@loc_orc
+#### A masked pattern was here ####
+POSTHOOK: query: analyze table loc_orc compute statistics for columns state,locid,zip,year
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@loc_orc
+#### A masked pattern was here ####
+POSTHOOK: Lineage: loc_orc.locid SIMPLE [(loc_staging)loc_staging.FieldSchema(name:locid, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.state SIMPLE [(loc_staging)loc_staging.FieldSchema(name:state, type:string, comment:null), ]
+POSTHOOK: Lineage: loc_orc.year SIMPLE [(loc_staging)loc_staging.FieldSchema(name:year, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.zip SIMPLE [(loc_staging)loc_staging.FieldSchema(name:zip, type:bigint, comment:null), ]
+PREHOOK: query: -- numRows: 8 rawDataSize: 688
+explain extended select state from loc_orc
+PREHOOK: type: QUERY
+POSTHOOK: query: -- numRows: 8 rawDataSize: 688
+explain extended select state from loc_orc
+POSTHOOK: type: QUERY
+POSTHOOK: Lineage: loc_orc.locid SIMPLE [(loc_staging)loc_staging.FieldSchema(name:locid, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.state SIMPLE [(loc_staging)loc_staging.FieldSchema(name:state, type:string, comment:null), ]
+POSTHOOK: Lineage: loc_orc.year SIMPLE [(loc_staging)loc_staging.FieldSchema(name:year, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.zip SIMPLE [(loc_staging)loc_staging.FieldSchema(name:zip, type:bigint, comment:null), ]
+ABSTRACT SYNTAX TREE:
+  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME loc_orc))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL state)))))
+
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Alias -> Map Operator Tree:
+        loc_orc 
+          TableScan
+            alias: loc_orc
+            Statistics:
+                numRows: 8 dataSize: 796 basicStatsState: COMPLETE colStatsState: COMPLETE
+            GatherStats: false
+            Select Operator
+              expressions:
+                    expr: state
+                    type: string
+              outputColumnNames: _col0
+              Statistics:
+                  numRows: 8 dataSize: 688 basicStatsState: COMPLETE colStatsState: COMPLETE
+              File Output Operator
+                compressed: false
+                GlobalTableId: 0
+#### A masked pattern was here ####
+                NumFilesPerFileSink: 1
+                Statistics:
+                    numRows: 8 dataSize: 688 basicStatsState: COMPLETE colStatsState: COMPLETE
+#### A masked pattern was here ####
+                table:
+                    input format: org.apache.hadoop.mapred.TextInputFormat
+                    output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                    properties:
+                      columns _col0
+                      columns.types string
+                      escape.delim \
+                      hive.serialization.extend.nesting.levels true
+                      serialization.format 1
+                      serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                    serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                TotalFiles: 1
+                GatherStats: false
+                MultiFileSpray: false
+      Path -> Alias:
+#### A masked pattern was here ####
+      Path -> Partition:
+#### A masked pattern was here ####
+          Partition
+            base file name: loc_orc
+            input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+            output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
+            properties:
+              COLUMN_STATS_ACCURATE true
+              bucket_count -1
+              columns state,locid,zip,year
+              columns.types string:int:bigint:int
+              field.delim |
+#### A masked pattern was here ####
+              name default.loc_orc
+              numFiles 1
+              numRows 8
+              rawDataSize 796
+              serialization.ddl struct loc_orc { string state, i32 locid, i64 zip, i32 year}
+              serialization.format |
+              serialization.lib org.apache.hadoop.hive.ql.io.orc.OrcSerde
+              totalSize 489
+#### A masked pattern was here ####
+            serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
+          
+              input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+              output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
+              properties:
+                COLUMN_STATS_ACCURATE true
+                bucket_count -1
+                columns state,locid,zip,year
+                columns.types string:int:bigint:int
+                field.delim |
+#### A masked pattern was here ####
+                name default.loc_orc
+                numFiles 1
+                numRows 8
+                rawDataSize 796
+                serialization.ddl struct loc_orc { string state, i32 locid, i64 zip, i32 year}
+                serialization.format |
+                serialization.lib org.apache.hadoop.hive.ql.io.orc.OrcSerde
+                totalSize 489
+#### A masked pattern was here ####
+              serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
+              name: default.loc_orc
+            name: default.loc_orc
+      Truncated Path -> Alias:
+        /loc_orc [loc_orc]
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+
+
+PREHOOK: query: -- numRows: 16 rawDataSize: 1376
+explain extended select * from (select state from loc_orc union all select state from loc_orc) tmp
+PREHOOK: type: QUERY
+POSTHOOK: query: -- numRows: 16 rawDataSize: 1376
+explain extended select * from (select state from loc_orc union all select state from loc_orc) tmp
+POSTHOOK: type: QUERY
+POSTHOOK: Lineage: loc_orc.locid SIMPLE [(loc_staging)loc_staging.FieldSchema(name:locid, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.state SIMPLE [(loc_staging)loc_staging.FieldSchema(name:state, type:string, comment:null), ]
+POSTHOOK: Lineage: loc_orc.year SIMPLE [(loc_staging)loc_staging.FieldSchema(name:year, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.zip SIMPLE [(loc_staging)loc_staging.FieldSchema(name:zip, type:bigint, comment:null), ]
+ABSTRACT SYNTAX TREE:
+  (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_UNION (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME loc_orc))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL state))))) (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME loc_orc))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL state)))))) tmp)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF))))
+
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Alias -> Map Operator Tree:
+        null-subquery1:tmp-subquery1:loc_orc 
+          TableScan
+            alias: loc_orc
+            Statistics:
+                numRows: 8 dataSize: 796 basicStatsState: COMPLETE colStatsState: COMPLETE
+            GatherStats: false
+            Select Operator
+              expressions:
+                    expr: state
+                    type: string
+              outputColumnNames: _col0
+              Statistics:
+                  numRows: 8 dataSize: 688 basicStatsState: COMPLETE colStatsState: COMPLETE
+              Union
+                Statistics:
+                    numRows: 16 dataSize: 1376 basicStatsState: COMPLETE colStatsState: COMPLETE
+                Select Operator
+                  expressions:
+                        expr: _col0
+                        type: string
+                  outputColumnNames: _col0
+                  Statistics:
+                      numRows: 16 dataSize: 1376 basicStatsState: COMPLETE colStatsState: COMPLETE
+                  File Output Operator
+                    compressed: false
+                    GlobalTableId: 0
+#### A masked pattern was here ####
+                    NumFilesPerFileSink: 1
+                    Statistics:
+                        numRows: 16 dataSize: 1376 basicStatsState: COMPLETE colStatsState: COMPLETE
+#### A masked pattern was here ####
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        properties:
+                          columns _col0
+                          columns.types string
+                          escape.delim \
+                          hive.serialization.extend.nesting.levels true
+                          serialization.format 1
+                          serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                    TotalFiles: 1
+                    GatherStats: false
+                    MultiFileSpray: false
+        null-subquery2:tmp-subquery2:loc_orc 
+          TableScan
+            alias: loc_orc
+            Statistics:
+                numRows: 8 dataSize: 796 basicStatsState: COMPLETE colStatsState: COMPLETE
+            GatherStats: false
+            Select Operator
+              expressions:
+                    expr: state
+                    type: string
+              outputColumnNames: _col0
+              Statistics:
+                  numRows: 8 dataSize: 688 basicStatsState: COMPLETE colStatsState: COMPLETE
+              Union
+                Statistics:
+                    numRows: 16 dataSize: 1376 basicStatsState: COMPLETE colStatsState: COMPLETE
+                Select Operator
+                  expressions:
+                        expr: _col0
+                        type: string
+                  outputColumnNames: _col0
+                  Statistics:
+                      numRows: 16 dataSize: 1376 basicStatsState: COMPLETE colStatsState: COMPLETE
+                  File Output Operator
+                    compressed: false
+                    GlobalTableId: 0
+#### A masked pattern was here ####
+                    NumFilesPerFileSink: 1
+                    Statistics:
+                        numRows: 16 dataSize: 1376 basicStatsState: COMPLETE colStatsState: COMPLETE
+#### A masked pattern was here ####
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        properties:
+                          columns _col0
+                          columns.types string
+                          escape.delim \
+                          hive.serialization.extend.nesting.levels true
+                          serialization.format 1
+                          serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                    TotalFiles: 1
+                    GatherStats: false
+                    MultiFileSpray: false
+      Path -> Alias:
+#### A masked pattern was here ####
+      Path -> Partition:
+#### A masked pattern was here ####
+          Partition
+            base file name: loc_orc
+            input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+            output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
+            properties:
+              COLUMN_STATS_ACCURATE true
+              bucket_count -1
+              columns state,locid,zip,year
+              columns.types string:int:bigint:int
+              field.delim |
+#### A masked pattern was here ####
+              name default.loc_orc
+              numFiles 1
+              numRows 8
+              rawDataSize 796
+              serialization.ddl struct loc_orc { string state, i32 locid, i64 zip, i32 year}
+              serialization.format |
+              serialization.lib org.apache.hadoop.hive.ql.io.orc.OrcSerde
+              totalSize 489
+#### A masked pattern was here ####
+            serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
+          
+              input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+              output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
+              properties:
+                COLUMN_STATS_ACCURATE true
+                bucket_count -1
+                columns state,locid,zip,year
+                columns.types string:int:bigint:int
+                field.delim |
+#### A masked pattern was here ####
+                name default.loc_orc
+                numFiles 1
+                numRows 8
+                rawDataSize 796
+                serialization.ddl struct loc_orc { string state, i32 locid, i64 zip, i32 year}
+                serialization.format |
+                serialization.lib org.apache.hadoop.hive.ql.io.orc.OrcSerde
+                totalSize 489
+#### A masked pattern was here ####
+              serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
+              name: default.loc_orc
+            name: default.loc_orc
+      Truncated Path -> Alias:
+        /loc_orc [null-subquery1:tmp-subquery1:loc_orc, null-subquery2:tmp-subquery2:loc_orc]
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+
+
+PREHOOK: query: -- numRows: 8 rawDataSize: 796
+explain extended select * from loc_orc
+PREHOOK: type: QUERY
+POSTHOOK: query: -- numRows: 8 rawDataSize: 796
+explain extended select * from loc_orc
+POSTHOOK: type: QUERY
+POSTHOOK: Lineage: loc_orc.locid SIMPLE [(loc_staging)loc_staging.FieldSchema(name:locid, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.state SIMPLE [(loc_staging)loc_staging.FieldSchema(name:state, type:string, comment:null), ]
+POSTHOOK: Lineage: loc_orc.year SIMPLE [(loc_staging)loc_staging.FieldSchema(name:year, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.zip SIMPLE [(loc_staging)loc_staging.FieldSchema(name:zip, type:bigint, comment:null), ]
+ABSTRACT SYNTAX TREE:
+  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME loc_orc))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF))))
+
+STAGE DEPENDENCIES:
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        TableScan
+          alias: loc_orc
+          Statistics:
+              numRows: 8 dataSize: 796 basicStatsState: COMPLETE colStatsState: COMPLETE
+          GatherStats: false
+          Select Operator
+            expressions:
+                  expr: state
+                  type: string
+                  expr: locid
+                  type: int
+                  expr: zip
+                  type: bigint
+                  expr: year
+                  type: int
+            outputColumnNames: _col0, _col1, _col2, _col3
+            Statistics:
+                numRows: 8 dataSize: 796 basicStatsState: COMPLETE colStatsState: COMPLETE
+            ListSink
+
+
+PREHOOK: query: -- numRows: 16 rawDataSize: 1592
+explain extended select * from (select * from loc_orc union all select * from loc_orc) tmp
+PREHOOK: type: QUERY
+POSTHOOK: query: -- numRows: 16 rawDataSize: 1592
+explain extended select * from (select * from loc_orc union all select * from loc_orc) tmp
+POSTHOOK: type: QUERY
+POSTHOOK: Lineage: loc_orc.locid SIMPLE [(loc_staging)loc_staging.FieldSchema(name:locid, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.state SIMPLE [(loc_staging)loc_staging.FieldSchema(name:state, type:string, comment:null), ]
+POSTHOOK: Lineage: loc_orc.year SIMPLE [(loc_staging)loc_staging.FieldSchema(name:year, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.zip SIMPLE [(loc_staging)loc_staging.FieldSchema(name:zip, type:bigint, comment:null), ]
+ABSTRACT SYNTAX TREE:
+  (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_UNION (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME loc_orc))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)))) (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME loc_orc))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF))))) tmp)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF))))
+
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Alias -> Map Operator Tree:
+        null-subquery1:tmp-subquery1:loc_orc 
+          TableScan
+            alias: loc_orc
+            Statistics:
+                numRows: 8 dataSize: 796 basicStatsState: COMPLETE colStatsState: COMPLETE
+            GatherStats: false
+            Select Operator
+              expressions:
+                    expr: state
+                    type: string
+                    expr: locid
+                    type: int
+                    expr: zip
+                    type: bigint
+                    expr: year
+                    type: int
+              outputColumnNames: _col0, _col1, _col2, _col3
+              Statistics:
+                  numRows: 8 dataSize: 796 basicStatsState: COMPLETE colStatsState: COMPLETE
+              Union
+                Statistics:
+                    numRows: 16 dataSize: 1592 basicStatsState: COMPLETE colStatsState: COMPLETE
+                Select Operator
+                  expressions:
+                        expr: _col0
+                        type: string
+                        expr: _col1
+                        type: int
+                        expr: _col2
+                        type: bigint
+                        expr: _col3
+                        type: int
+                  outputColumnNames: _col0, _col1, _col2, _col3
+                  Statistics:
+                      numRows: 16 dataSize: 1592 basicStatsState: COMPLETE colStatsState: COMPLETE
+                  File Output Operator
+                    compressed: false
+                    GlobalTableId: 0
+#### A masked pattern was here ####
+                    NumFilesPerFileSink: 1
+                    Statistics:
+                        numRows: 16 dataSize: 1592 basicStatsState: COMPLETE colStatsState: COMPLETE
+#### A masked pattern was here ####
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        properties:
+                          columns _col0,_col1,_col2,_col3
+                          columns.types string:int:bigint:int
+                          escape.delim \
+                          hive.serialization.extend.nesting.levels true
+                          serialization.format 1
+                          serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                    TotalFiles: 1
+                    GatherStats: false
+                    MultiFileSpray: false
+        null-subquery2:tmp-subquery2:loc_orc 
+          TableScan
+            alias: loc_orc
+            Statistics:
+                numRows: 8 dataSize: 796 basicStatsState: COMPLETE colStatsState: COMPLETE
+            GatherStats: false
+            Select Operator
+              expressions:
+                    expr: state
+                    type: string
+                    expr: locid
+                    type: int
+                    expr: zip
+                    type: bigint
+                    expr: year
+                    type: int
+              outputColumnNames: _col0, _col1, _col2, _col3
+              Statistics:
+                  numRows: 8 dataSize: 796 basicStatsState: COMPLETE colStatsState: COMPLETE
+              Union
+                Statistics:
+                    numRows: 16 dataSize: 1592 basicStatsState: COMPLETE colStatsState: COMPLETE
+                Select Operator
+                  expressions:
+                        expr: _col0
+                        type: string
+                        expr: _col1
+                        type: int
+                        expr: _col2
+                        type: bigint
+                        expr: _col3
+                        type: int
+                  outputColumnNames: _col0, _col1, _col2, _col3
+                  Statistics:
+                      numRows: 16 dataSize: 1592 basicStatsState: COMPLETE colStatsState: COMPLETE
+                  File Output Operator
+                    compressed: false
+                    GlobalTableId: 0
+#### A masked pattern was here ####
+                    NumFilesPerFileSink: 1
+                    Statistics:
+                        numRows: 16 dataSize: 1592 basicStatsState: COMPLETE colStatsState: COMPLETE
+#### A masked pattern was here ####
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        properties:
+                          columns _col0,_col1,_col2,_col3
+                          columns.types string:int:bigint:int
+                          escape.delim \
+                          hive.serialization.extend.nesting.levels true
+                          serialization.format 1
+                          serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                    TotalFiles: 1
+                    GatherStats: false
+                    MultiFileSpray: false
+      Path -> Alias:
+#### A masked pattern was here ####
+      Path -> Partition:
+#### A masked pattern was here ####
+          Partition
+            base file name: loc_orc
+            input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+            output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
+            properties:
+              COLUMN_STATS_ACCURATE true
+              bucket_count -1
+              columns state,locid,zip,year
+              columns.types string:int:bigint:int
+              field.delim |
+#### A masked pattern was here ####
+              name default.loc_orc
+              numFiles 1
+              numRows 8
+              rawDataSize 796
+              serialization.ddl struct loc_orc { string state, i32 locid, i64 zip, i32 year}
+              serialization.format |
+              serialization.lib org.apache.hadoop.hive.ql.io.orc.OrcSerde
+              totalSize 489
+#### A masked pattern was here ####
+            serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
+          
+              input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+              output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
+              properties:
+                COLUMN_STATS_ACCURATE true
+                bucket_count -1
+                columns state,locid,zip,year
+                columns.types string:int:bigint:int
+                field.delim |
+#### A masked pattern was here ####
+                name default.loc_orc
+                numFiles 1
+                numRows 8
+                rawDataSize 796
+                serialization.ddl struct loc_orc { string state, i32 locid, i64 zip, i32 year}
+                serialization.format |
+                serialization.lib org.apache.hadoop.hive.ql.io.orc.OrcSerde
+                totalSize 489
+#### A masked pattern was here ####
+              serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
+              name: default.loc_orc
+            name: default.loc_orc
+      Truncated Path -> Alias:
+        /loc_orc [null-subquery1:tmp-subquery1:loc_orc, null-subquery2:tmp-subquery2:loc_orc]
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+
+
+PREHOOK: query: create database test
+PREHOOK: type: CREATEDATABASE
+POSTHOOK: query: create database test
+POSTHOOK: type: CREATEDATABASE
+POSTHOOK: Lineage: loc_orc.locid SIMPLE [(loc_staging)loc_staging.FieldSchema(name:locid, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.state SIMPLE [(loc_staging)loc_staging.FieldSchema(name:state, type:string, comment:null), ]
+POSTHOOK: Lineage: loc_orc.year SIMPLE [(loc_staging)loc_staging.FieldSchema(name:year, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.zip SIMPLE [(loc_staging)loc_staging.FieldSchema(name:zip, type:bigint, comment:null), ]
+PREHOOK: query: use test
+PREHOOK: type: SWITCHDATABASE
+POSTHOOK: query: use test
+POSTHOOK: type: SWITCHDATABASE
+POSTHOOK: Lineage: loc_orc.locid SIMPLE [(loc_staging)loc_staging.FieldSchema(name:locid, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.state SIMPLE [(loc_staging)loc_staging.FieldSchema(name:state, type:string, comment:null), ]
+POSTHOOK: Lineage: loc_orc.year SIMPLE [(loc_staging)loc_staging.FieldSchema(name:year, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.zip SIMPLE [(loc_staging)loc_staging.FieldSchema(name:zip, type:bigint, comment:null), ]
+PREHOOK: query: create table if not exists loc_staging (
+  state string,
+  locid int,
+  zip bigint,
+  year int
+) row format delimited fields terminated by '|' stored as textfile
+PREHOOK: type: CREATETABLE
+POSTHOOK: query: create table if not exists loc_staging (
+  state string,
+  locid int,
+  zip bigint,
+  year int
+) row format delimited fields terminated by '|' stored as textfile
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: test@loc_staging
+POSTHOOK: Lineage: loc_orc.locid SIMPLE [(loc_staging)loc_staging.FieldSchema(name:locid, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.state SIMPLE [(loc_staging)loc_staging.FieldSchema(name:state, type:string, comment:null), ]
+POSTHOOK: Lineage: loc_orc.year SIMPLE [(loc_staging)loc_staging.FieldSchema(name:year, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.zip SIMPLE [(loc_staging)loc_staging.FieldSchema(name:zip, type:bigint, comment:null), ]
+PREHOOK: query: create table loc_orc like loc_staging
+PREHOOK: type: CREATETABLE
+POSTHOOK: query: create table loc_orc like loc_staging
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: test@loc_orc
+POSTHOOK: Lineage: loc_orc.locid SIMPLE [(loc_staging)loc_staging.FieldSchema(name:locid, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.state SIMPLE [(loc_staging)loc_staging.FieldSchema(name:state, type:string, comment:null), ]
+POSTHOOK: Lineage: loc_orc.year SIMPLE [(loc_staging)loc_staging.FieldSchema(name:year, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.zip SIMPLE [(loc_staging)loc_staging.FieldSchema(name:zip, type:bigint, comment:null), ]
+PREHOOK: query: alter table loc_orc set fileformat orc
+PREHOOK: type: ALTERTABLE_FILEFORMAT
+PREHOOK: Input: test@loc_orc
+PREHOOK: Output: test@loc_orc
+POSTHOOK: query: alter table loc_orc set fileformat orc
+POSTHOOK: type: ALTERTABLE_FILEFORMAT
+POSTHOOK: Input: test@loc_orc
+POSTHOOK: Output: test@loc_orc
+POSTHOOK: Lineage: loc_orc.locid SIMPLE [(loc_staging)loc_staging.FieldSchema(name:locid, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.state SIMPLE [(loc_staging)loc_staging.FieldSchema(name:state, type:string, comment:null), ]
+POSTHOOK: Lineage: loc_orc.year SIMPLE [(loc_staging)loc_staging.FieldSchema(name:year, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.zip SIMPLE [(loc_staging)loc_staging.FieldSchema(name:zip, type:bigint, comment:null), ]
+PREHOOK: query: load data local inpath '../../data/files/loc.txt' overwrite into table loc_staging
+PREHOOK: type: LOAD
+PREHOOK: Output: test@loc_staging
+POSTHOOK: query: load data local inpath '../../data/files/loc.txt' overwrite into table loc_staging
+POSTHOOK: type: LOAD
+POSTHOOK: Output: test@loc_staging
+POSTHOOK: Lineage: loc_orc.locid SIMPLE [(loc_staging)loc_staging.FieldSchema(name:locid, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.state SIMPLE [(loc_staging)loc_staging.FieldSchema(name:state, type:string, comment:null), ]
+POSTHOOK: Lineage: loc_orc.year SIMPLE [(loc_staging)loc_staging.FieldSchema(name:year, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.zip SIMPLE [(loc_staging)loc_staging.FieldSchema(name:zip, type:bigint, comment:null), ]
+PREHOOK: query: insert overwrite table loc_orc select * from loc_staging
+PREHOOK: type: QUERY
+PREHOOK: Input: test@loc_staging
+PREHOOK: Output: test@loc_orc
+POSTHOOK: query: insert overwrite table loc_orc select * from loc_staging
+POSTHOOK: type: QUERY
+POSTHOOK: Input: test@loc_staging
+POSTHOOK: Output: test@loc_orc
+POSTHOOK: Lineage: loc_orc.locid SIMPLE [(loc_staging)loc_staging.FieldSchema(name:locid, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.locid SIMPLE [(loc_staging)loc_staging.FieldSchema(name:locid, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.state SIMPLE [(loc_staging)loc_staging.FieldSchema(name:state, type:string, comment:null), ]
+POSTHOOK: Lineage: loc_orc.state SIMPLE [(loc_staging)loc_staging.FieldSchema(name:state, type:string, comment:null), ]
+POSTHOOK: Lineage: loc_orc.year SIMPLE [(loc_staging)loc_staging.FieldSchema(name:year, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.year SIMPLE [(loc_staging)loc_staging.FieldSchema(name:year, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.zip SIMPLE [(loc_staging)loc_staging.FieldSchema(name:zip, type:bigint, comment:null), ]
+POSTHOOK: Lineage: loc_orc.zip SIMPLE [(loc_staging)loc_staging.FieldSchema(name:zip, type:bigint, comment:null), ]
+PREHOOK: query: analyze table loc_staging compute statistics
+PREHOOK: type: QUERY
+PREHOOK: Input: test@loc_staging
+PREHOOK: Output: test@loc_staging
+POSTHOOK: query: analyze table loc_staging compute statistics
+POSTHOOK: type: QUERY
+POSTHOOK: Input: test@loc_staging
+POSTHOOK: Output: test@loc_staging
+POSTHOOK: Lineage: loc_orc.locid SIMPLE [(loc_staging)loc_staging.FieldSchema(name:locid, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.locid SIMPLE [(loc_staging)loc_staging.FieldSchema(name:locid, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.state SIMPLE [(loc_staging)loc_staging.FieldSchema(name:state, type:string, comment:null), ]
+POSTHOOK: Lineage: loc_orc.state SIMPLE [(loc_staging)loc_staging.FieldSchema(name:state, type:string, comment:null), ]
+POSTHOOK: Lineage: loc_orc.year SIMPLE [(loc_staging)loc_staging.FieldSchema(name:year, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.year SIMPLE [(loc_staging)loc_staging.FieldSchema(name:year, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.zip SIMPLE [(loc_staging)loc_staging.FieldSchema(name:zip, type:bigint, comment:null), ]
+POSTHOOK: Lineage: loc_orc.zip SIMPLE [(loc_staging)loc_staging.FieldSchema(name:zip, type:bigint, comment:null), ]
+PREHOOK: query: analyze table loc_staging compute statistics for columns state,locid,zip,year
+PREHOOK: type: QUERY
+PREHOOK: Input: test@loc_staging
+#### A masked pattern was here ####
+POSTHOOK: query: analyze table loc_staging compute statistics for columns state,locid,zip,year
+POSTHOOK: type: QUERY
+POSTHOOK: Input: test@loc_staging
+#### A masked pattern was here ####
+POSTHOOK: Lineage: loc_orc.locid SIMPLE [(loc_staging)loc_staging.FieldSchema(name:locid, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.locid SIMPLE [(loc_staging)loc_staging.FieldSchema(name:locid, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.state SIMPLE [(loc_staging)loc_staging.FieldSchema(name:state, type:string, comment:null), ]
+POSTHOOK: Lineage: loc_orc.state SIMPLE [(loc_staging)loc_staging.FieldSchema(name:state, type:string, comment:null), ]
+POSTHOOK: Lineage: loc_orc.year SIMPLE [(loc_staging)loc_staging.FieldSchema(name:year, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.year SIMPLE [(loc_staging)loc_staging.FieldSchema(name:year, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.zip SIMPLE [(loc_staging)loc_staging.FieldSchema(name:zip, type:bigint, comment:null), ]
+POSTHOOK: Lineage: loc_orc.zip SIMPLE [(loc_staging)loc_staging.FieldSchema(name:zip, type:bigint, comment:null), ]
+PREHOOK: query: analyze table loc_orc compute statistics for columns state,locid,zip,year
+PREHOOK: type: QUERY
+PREHOOK: Input: test@loc_orc
+#### A masked pattern was here ####
+POSTHOOK: query: analyze table loc_orc compute statistics for columns state,locid,zip,year
+POSTHOOK: type: QUERY
+POSTHOOK: Input: test@loc_orc
+#### A masked pattern was here ####
+POSTHOOK: Lineage: loc_orc.locid SIMPLE [(loc_staging)loc_staging.FieldSchema(name:locid, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.locid SIMPLE [(loc_staging)loc_staging.FieldSchema(name:locid, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.state SIMPLE [(loc_staging)loc_staging.FieldSchema(name:state, type:string, comment:null), ]
+POSTHOOK: Lineage: loc_orc.state SIMPLE [(loc_staging)loc_staging.FieldSchema(name:state, type:string, comment:null), ]
+POSTHOOK: Lineage: loc_orc.year SIMPLE [(loc_staging)loc_staging.FieldSchema(name:year, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.year SIMPLE [(loc_staging)loc_staging.FieldSchema(name:year, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.zip SIMPLE [(loc_staging)loc_staging.FieldSchema(name:zip, type:bigint, comment:null), ]
+POSTHOOK: Lineage: loc_orc.zip SIMPLE [(loc_staging)loc_staging.FieldSchema(name:zip, type:bigint, comment:null), ]
+PREHOOK: query: -- numRows: 16 rawDataSize: 1376
+explain extended select * from (select state from default.loc_orc union all select state from test.loc_orc) temp
+PREHOOK: type: QUERY
+POSTHOOK: query: -- numRows: 16 rawDataSize: 1376
+explain extended select * from (select state from default.loc_orc union all select state from test.loc_orc) temp
+POSTHOOK: type: QUERY
+POSTHOOK: Lineage: loc_orc.locid SIMPLE [(loc_staging)loc_staging.FieldSchema(name:locid, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.locid SIMPLE [(loc_staging)loc_staging.FieldSchema(name:locid, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.state SIMPLE [(loc_staging)loc_staging.FieldSchema(name:state, type:string, comment:null), ]
+POSTHOOK: Lineage: loc_orc.state SIMPLE [(loc_staging)loc_staging.FieldSchema(name:state, type:string, comment:null), ]
+POSTHOOK: Lineage: loc_orc.year SIMPLE [(loc_staging)loc_staging.FieldSchema(name:year, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.year SIMPLE [(loc_staging)loc_staging.FieldSchema(name:year, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.zip SIMPLE [(loc_staging)loc_staging.FieldSchema(name:zip, type:bigint, comment:null), ]
+POSTHOOK: Lineage: loc_orc.zip SIMPLE [(loc_staging)loc_staging.FieldSchema(name:zip, type:bigint, comment:null), ]
+ABSTRACT SYNTAX TREE:
+  (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_UNION (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME default loc_orc))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL state))))) (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME test loc_orc))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL state)))))) temp)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF))))
+
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Alias -> Map Operator Tree:
+        null-subquery1:temp-subquery1:loc_orc 
+          TableScan
+            alias: loc_orc
+            Statistics:
+                numRows: 8 dataSize: 796 basicStatsState: COMPLETE colStatsState: COMPLETE
+            GatherStats: false
+            Select Operator
+              expressions:
+                    expr: state
+                    type: string
+              outputColumnNames: _col0
+              Statistics:
+                  numRows: 8 dataSize: 688 basicStatsState: COMPLETE colStatsState: COMPLETE
+              Union
+                Statistics:
+                    numRows: 16 dataSize: 1376 basicStatsState: COMPLETE colStatsState: COMPLETE
+                Select Operator
+                  expressions:
+                        expr: _col0
+                        type: string
+                  outputColumnNames: _col0
+                  Statistics:
+                      numRows: 16 dataSize: 1376 basicStatsState: COMPLETE colStatsState: COMPLETE
+                  File Output Operator
+                    compressed: false
+                    GlobalTableId: 0
+#### A masked pattern was here ####
+                    NumFilesPerFileSink: 1
+                    Statistics:
+                        numRows: 16 dataSize: 1376 basicStatsState: COMPLETE colStatsState: COMPLETE
+#### A masked pattern was here ####
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        properties:
+                          columns _col0
+                          columns.types string
+                          escape.delim \
+                          hive.serialization.extend.nesting.levels true
+                          serialization.format 1
+                          serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                    TotalFiles: 1
+                    GatherStats: false
+                    MultiFileSpray: false
+        null-subquery2:temp-subquery2:loc_orc 
+          TableScan
+            alias: loc_orc
+            Statistics:
+                numRows: 8 dataSize: 796 basicStatsState: COMPLETE colStatsState: COMPLETE
+            GatherStats: false
+            Select Operator
+              expressions:
+                    expr: state
+                    type: string
+              outputColumnNames: _col0
+              Statistics:
+                  numRows: 8 dataSize: 688 basicStatsState: COMPLETE colStatsState: COMPLETE
+              Union
+                Statistics:
+                    numRows: 16 dataSize: 1376 basicStatsState: COMPLETE colStatsState: COMPLETE
+                Select Operator
+                  expressions:
+                        expr: _col0
+                        type: string
+                  outputColumnNames: _col0
+                  Statistics:
+                      numRows: 16 dataSize: 1376 basicStatsState: COMPLETE colStatsState: COMPLETE
+                  File Output Operator
+                    compressed: false
+                    GlobalTableId: 0
+#### A masked pattern was here ####
+                    NumFilesPerFileSink: 1
+                    Statistics:
+                        numRows: 16 dataSize: 1376 basicStatsState: COMPLETE colStatsState: COMPLETE
+#### A masked pattern was here ####
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        properties:
+                          columns _col0
+                          columns.types string
+                          escape.delim \
+                          hive.serialization.extend.nesting.levels true
+                          serialization.format 1
+                          serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                    TotalFiles: 1
+                    GatherStats: false
+                    MultiFileSpray: false
+      Path -> Alias:
+#### A masked pattern was here ####
+      Path -> Partition:
+#### A masked pattern was here ####
+          Partition
+            base file name: loc_orc
+            input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+            output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
+            properties:
+              COLUMN_STATS_ACCURATE true
+              bucket_count -1
+              columns state,locid,zip,year
+              columns.types string:int:bigint:int
+              field.delim |
+#### A masked pattern was here ####
+              name default.loc_orc
+              numFiles 1
+              numRows 8
+              rawDataSize 796
+              serialization.ddl struct loc_orc { string state, i32 locid, i64 zip, i32 year}
+              serialization.format |
+              serialization.lib org.apache.hadoop.hive.ql.io.orc.OrcSerde
+              totalSize 489
+#### A masked pattern was here ####
+            serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
+          
+              input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+              output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
+              properties:
+                COLUMN_STATS_ACCURATE true
+                bucket_count -1
+                columns state,locid,zip,year
+                columns.types string:int:bigint:int
+                field.delim |
+#### A masked pattern was here ####
+                name default.loc_orc
+                numFiles 1
+                numRows 8
+                rawDataSize 796
+                serialization.ddl struct loc_orc { string state, i32 locid, i64 zip, i32 year}
+                serialization.format |
+                serialization.lib org.apache.hadoop.hive.ql.io.orc.OrcSerde
+                totalSize 489
+#### A masked pattern was here ####
+              serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
+              name: default.loc_orc
+            name: default.loc_orc
+#### A masked pattern was here ####
+          Partition
+            base file name: loc_orc
+            input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+            output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
+            properties:
+              COLUMN_STATS_ACCURATE true
+              bucket_count -1
+              columns state,locid,zip,year
+              columns.types string:int:bigint:int
+              field.delim |
+#### A masked pattern was here ####
+              name test.loc_orc
+              numFiles 1
+              numRows 8
+              rawDataSize 796
+              serialization.ddl struct loc_orc { string state, i32 locid, i64 zip, i32 year}
+              serialization.format |
+              serialization.lib org.apache.hadoop.hive.ql.io.orc.OrcSerde
+              totalSize 489
+#### A masked pattern was here ####
+            serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
+          
+              input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+              output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
+              properties:
+                COLUMN_STATS_ACCURATE true
+                bucket_count -1
+                columns state,locid,zip,year
+                columns.types string:int:bigint:int
+                field.delim |
+#### A masked pattern was here ####
+                name test.loc_orc
+                numFiles 1
+                numRows 8
+                rawDataSize 796
+                serialization.ddl struct loc_orc { string state, i32 locid, i64 zip, i32 year}
+                serialization.format |
+                serialization.lib org.apache.hadoop.hive.ql.io.orc.OrcSerde
+                totalSize 489
+#### A masked pattern was here ####
+              serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
+              name: test.loc_orc
+            name: test.loc_orc
+      Truncated Path -> Alias:
+        /loc_orc [null-subquery1:temp-subquery1:loc_orc]
+        /test.db/loc_orc [null-subquery2:temp-subquery2:loc_orc]
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+
+
+PREHOOK: query: -- numRows: 16 rawDataSize: 1376
+explain extended select * from (select state from test.loc_staging union all select state from test.loc_orc) temp
+PREHOOK: type: QUERY
+POSTHOOK: query: -- numRows: 16 rawDataSize: 1376
+explain extended select * from (select state from test.loc_staging union all select state from test.loc_orc) temp
+POSTHOOK: type: QUERY
+POSTHOOK: Lineage: loc_orc.locid SIMPLE [(loc_staging)loc_staging.FieldSchema(name:locid, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.locid SIMPLE [(loc_staging)loc_staging.FieldSchema(name:locid, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.state SIMPLE [(loc_staging)loc_staging.FieldSchema(name:state, type:string, comment:null), ]
+POSTHOOK: Lineage: loc_orc.state SIMPLE [(loc_staging)loc_staging.FieldSchema(name:state, type:string, comment:null), ]
+POSTHOOK: Lineage: loc_orc.year SIMPLE [(loc_staging)loc_staging.FieldSchema(name:year, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.year SIMPLE [(loc_staging)loc_staging.FieldSchema(name:year, type:int, comment:null), ]
+POSTHOOK: Lineage: loc_orc.zip SIMPLE [(loc_staging)loc_staging.FieldSchema(name:zip, type:bigint, comment:null), ]
+POSTHOOK: Lineage: loc_orc.zip SIMPLE [(loc_staging)loc_staging.FieldSchema(name:zip, type:bigint, comment:null), ]
+ABSTRACT SYNTAX TREE:
+  (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_UNION (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME test loc_staging))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL state))))) (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME test loc_orc))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL state)))))) temp)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF))))
+
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Alias -> Map Operator Tree:
+        null-subquery1:temp-subquery1:loc_staging 
+          TableScan
+            alias: loc_staging
+            Statistics:
+                numRows: 8 dataSize: 117 basicStatsState: COMPLETE colStatsState: COMPLETE
+            GatherStats: false
+            Select Operator
+              expressions:
+                    expr: state
+                    type: string
+              outputColumnNames: _col0
+              Statistics:
+                  numRows: 8 dataSize: 688 basicStatsState: COMPLETE colStatsState: COMPLETE
+              Union
+                Statistics:
+                    numRows: 16 dataSize: 1376 basicStatsState: COMPLETE colStatsState: COMPLETE
+                Select Operator
+                  expressions:
+                        expr: _col0
+                        type: string
+                  outputColumnNames: _col0
+                  Statistics:
+                      numRows: 16 dataSize: 1376 basicStatsState: COMPLETE colStatsState: COMPLETE
+                  File Output Operator
+                    compressed: false
+                    GlobalTableId: 0
+#### A masked pattern was here ####
+                    NumFilesPerFileSink: 1
+                    Statistics:
+                        numRows: 16 dataSize: 1376 basicStatsState: COMPLETE colStatsState: COMPLETE
+#### A masked pattern was here ####
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        properties:
+                          columns _col0
+                          columns.types string
+                          escape.delim \
+                          hive.serialization.extend.nesting.levels true
+                          serialization.format 1
+                          serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                    TotalFiles: 1
+                    GatherStats: false
+                    MultiFileSpray: false
+        null-subquery2:temp-subquery2:loc_orc 
+          TableScan
+            alias: loc_orc
+            Statistics:
+                numRows: 8 dataSize: 796 basicStatsState: COMPLETE colStatsState: COMPLETE
+            GatherStats: false
+            Select Operator
+              expressions:
+                    expr: state
+                    type: string
+              outputColumnNames: _col0
+              Statistics:
+                  numRows: 8 dataSize: 688 basicStatsState: COMPLETE colStatsState: COMPLETE
+              Union
+                Statistics:
+                    numRows: 16 dataSize: 1376 basicStatsState: COMPLETE colStatsState: COMPLETE
+                Select Operator
+                  expressions:
+                        expr: _col0
+                        type: string
+                  outputColumnNames: _col0
+                  Statistics:
+                      numRows: 16 dataSize: 1376 basicStatsState: COMPLETE colStatsState: COMPLETE
+                  File Output Operator
+                    compressed: false
+                    GlobalTableId: 0
+#### A masked pattern was here ####
+                    NumFilesPerFileSink: 1
+                    Statistics:
+                        numRows: 16 dataSize: 1376 basicStatsState: COMPLETE colStatsState: COMPLETE
+#### A masked pattern was here ####
+                    table:
+                        input format: org.apache.hadoop.mapred.TextInputFormat
+                        output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                        properties:
+                          columns _col0
+                          columns.types string
+                          escape.delim \
+                          hive.serialization.extend.nesting.levels true
+                          serialization.format 1
+                          serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                    TotalFiles: 1
+                    GatherStats: false
+                    MultiFileSpray: false
+      Path -> Alias:
+#### A masked pattern was here ####
+      Path -> Partition:
+#### A masked pattern was here ####
+          Partition
+            base file name: loc_orc
+            input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+            output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
+            properties:
+              COLUMN_STATS_ACCURATE true
+              bucket_count -1
+              columns state,locid,zip,year
+              columns.types string:int:bigint:int
+              field.delim |
+#### A masked pattern was here ####
+              name test.loc_orc
+              numFiles 1
+              numRows 8
+              rawDataSize 796
+              serialization.ddl struct loc_orc { string state, i32 locid, i64 zip, i32 year}
+              serialization.format |
+              serialization.lib org.apache.hadoop.hive.ql.io.orc.OrcSerde
+              totalSize 489
+#### A masked pattern was here ####
+            serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
+          
+              input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+              output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
+              properties:
+                COLUMN_STATS_ACCURATE true
+                bucket_count -1
+                columns state,locid,zip,year
+                columns.types string:int:bigint:int
+                field.delim |
+#### A masked pattern was here ####
+                name test.loc_orc
+                numFiles 1
+                numRows 8
+                rawDataSize 796
+                serialization.ddl struct loc_orc { string state, i32 locid, i64 zip, i32 year}
+                serialization.format |
+                serialization.lib org.apache.hadoop.hive.ql.io.orc.OrcSerde
+                totalSize 489
+#### A masked pattern was here ####
+              serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
+              name: test.loc_orc
+            name: test.loc_orc
+#### A masked pattern was here ####
+          Partition
+            base file name: loc_staging
+            input format: org.apache.hadoop.mapred.TextInputFormat
+            output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+            properties:
+              COLUMN_STATS_ACCURATE true
+              bucket_count -1
+              columns state,locid,zip,year
+              columns.types string:int:bigint:int
+              field.delim |
+#### A masked pattern was here ####
+              name test.loc_staging
+              numFiles 1
+              numRows 8
+              rawDataSize 117
+              serialization.ddl struct loc_staging { string state, i32 locid, i64 zip, i32 year}
+              serialization.format |
+              serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+              totalSize 125
+#### A masked pattern was here ####
+            serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+          
+              input format: org.apache.hadoop.mapred.TextInputFormat
+              output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+              properties:
+                COLUMN_STATS_ACCURATE true
+                bucket_count -1
+                columns state,locid,zip,year
+                columns.types string:int:bigint:int
+                field.delim |
+#### A masked pattern was here ####
+                name test.loc_staging
+                numFiles 1
+                numRows 8
+                rawDataSize 117
+                serialization.ddl struct loc_staging { string state, i32 locid, i64 zip, i32 year}
+                serialization.format |
+                serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                totalSize 125
+#### A masked pattern was here ####
+              serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+              name: test.loc_staging
+            name: test.loc_staging
+      Truncated Path -> Alias:
+        /test.db/loc_orc [null-subquery2:temp-subquery2:loc_orc]
+        /test.db/loc_staging [null-subquery1:temp-subquery1:loc_staging]
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+
+



Mime
View raw message