PREHOOK: query: -- SORT_QUERY_RESULTS -- exists test create view cv1 as select * from src b where exists (select a.key from src a where b.value = a.value and a.key = b.key and a.value > 'val_9') PREHOOK: type: CREATEVIEW PREHOOK: Input: default@src PREHOOK: Output: database:default PREHOOK: Output: default@cv1 POSTHOOK: query: -- SORT_QUERY_RESULTS -- exists test create view cv1 as select * from src b where exists (select a.key from src a where b.value = a.value and a.key = b.key and a.value > 'val_9') POSTHOOK: type: CREATEVIEW POSTHOOK: Input: default@src POSTHOOK: Output: database:default POSTHOOK: Output: default@cv1 PREHOOK: query: select * from cv1 where cv1.key in (select key from cv1 c where c.key > '95') PREHOOK: type: QUERY PREHOOK: Input: default@cv1 PREHOOK: Input: default@src #### A masked pattern was here #### POSTHOOK: query: select * from cv1 where cv1.key in (select key from cv1 c where c.key > '95') POSTHOOK: type: QUERY POSTHOOK: Input: default@cv1 POSTHOOK: Input: default@src #### A masked pattern was here #### 96 val_96 97 val_97 97 val_97 98 val_98 98 val_98 PREHOOK: query: -- not in test create view cv2 as select * from src b where b.key not in (select a.key from src a where b.value = a.value and a.key = b.key and a.value > 'val_11' ) PREHOOK: type: CREATEVIEW PREHOOK: Input: default@src PREHOOK: Output: database:default PREHOOK: Output: default@cv2 POSTHOOK: query: -- not in test create view cv2 as select * from src b where b.key not in (select a.key from src a where b.value = a.value and a.key = b.key and a.value > 'val_11' ) POSTHOOK: type: CREATEVIEW POSTHOOK: Input: default@src POSTHOOK: Output: database:default POSTHOOK: Output: default@cv2 Warning: Shuffle Join JOIN[42][tables = [b, sq_1_notin_nullcheck]] in Stage 'Stage-5:MAPRED' is a cross product Warning: Shuffle Join JOIN[18][tables = [b, sq_1_notin_nullcheck]] in Stage 'Stage-1:MAPRED' is a cross product PREHOOK: query: explain select * from cv2 where cv2.key in (select key from cv2 c where c.key < '11') PREHOOK: type: QUERY POSTHOOK: query: explain select * from cv2 where cv2.key in (select key from cv2 c where c.key < '11') POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-4 is a root stage Stage-5 depends on stages: Stage-4 Stage-6 depends on stages: Stage-5 Stage-3 depends on stages: Stage-2, Stage-6 Stage-9 is a root stage Stage-1 depends on stages: Stage-9 Stage-2 depends on stages: Stage-1 Stage-0 depends on stages: Stage-3 STAGE PLANS: Stage: Stage-4 Map Reduce Map Operator Tree: TableScan alias: a Statistics: Num rows: 29 Data size: 5812 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: ((value > 'val_11') and ((key is null or value is null) or key is null)) (type: boolean) Statistics: Num rows: 12 Data size: 2404 Basic stats: COMPLETE Column stats: NONE Select Operator Statistics: Num rows: 12 Data size: 2404 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: count() mode: hash outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator sort order: Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: bigint) 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 Filter Operator predicate: (_col0 = 0) (type: boolean) Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE Select Operator expressions: _col0 (type: bigint) outputColumnNames: _col0 Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE Group By Operator keys: _col0 (type: bigint) mode: hash outputColumnNames: _col0 Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE 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 Stage: Stage-5 Map Reduce Map Operator Tree: TableScan Reduce Output Operator sort order: Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE TableScan alias: b Statistics: Num rows: 29 Data size: 5812 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: ((key < '11') and key is not null) (type: boolean) Statistics: Num rows: 5 Data size: 1002 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator sort order: Statistics: Num rows: 5 Data size: 1002 Basic stats: COMPLETE Column stats: NONE value expressions: key (type: string), value (type: string) Reduce Operator Tree: Join Operator condition map: Left Semi Join 0 to 1 condition expressions: 0 {VALUE._col0} {VALUE._col1} 1 outputColumnNames: _col0, _col1 Statistics: Num rows: 5 Data size: 1102 Basic stats: COMPLETE Column stats: NONE 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 Stage: Stage-6 Map Reduce Map Operator Tree: TableScan Reduce Output Operator key expressions: _col0 (type: string), _col1 (type: string), _col0 (type: string) sort order: +++ Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col0 (type: string) Statistics: Num rows: 5 Data size: 1102 Basic stats: COMPLETE Column stats: NONE TableScan alias: a Statistics: Num rows: 29 Data size: 5812 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: (((value > 'val_11') and (key < '11')) and key is not null) (type: boolean) Statistics: Num rows: 2 Data size: 400 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string), key (type: string) outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 2 Data size: 400 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string) sort order: +++ Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: string) Statistics: Num rows: 2 Data size: 400 Basic stats: COMPLETE Column stats: NONE Reduce Operator Tree: Join Operator condition map: Left Outer Join0 to 1 condition expressions: 0 {KEY.reducesinkkey0} 1 {KEY.reducesinkkey0} outputColumnNames: _col0, _col5 Statistics: Num rows: 5 Data size: 1212 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: _col5 is null (type: boolean) Statistics: Num rows: 2 Data size: 484 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: string) outputColumnNames: _col0 Statistics: Num rows: 2 Data size: 484 Basic stats: COMPLETE Column stats: NONE Group By Operator keys: _col0 (type: string) mode: hash outputColumnNames: _col0 Statistics: Num rows: 2 Data size: 484 Basic stats: COMPLETE Column stats: NONE 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 Stage: Stage-3 Map Reduce Map Operator Tree: TableScan Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) Statistics: Num rows: 8 Data size: 1711 Basic stats: COMPLETE Column stats: NONE value expressions: _col1 (type: string) TableScan Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) Statistics: Num rows: 2 Data size: 484 Basic stats: COMPLETE Column stats: NONE Reduce Operator Tree: Join Operator condition map: Left Semi Join 0 to 1 condition expressions: 0 {KEY.reducesinkkey0} {VALUE._col0} 1 outputColumnNames: _col0, _col1 Statistics: Num rows: 8 Data size: 1882 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: string), _col1 (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 8 Data size: 1882 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false Statistics: Num rows: 8 Data size: 1882 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe Stage: Stage-9 Map Reduce Map Operator Tree: TableScan alias: a Statistics: Num rows: 29 Data size: 5812 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: ((value > 'val_11') and ((key is null or value is null) or key is null)) (type: boolean) Statistics: Num rows: 12 Data size: 2404 Basic stats: COMPLETE Column stats: NONE Select Operator Statistics: Num rows: 12 Data size: 2404 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: count() mode: hash outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator sort order: Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: bigint) 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 Filter Operator predicate: (_col0 = 0) (type: boolean) Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE Select Operator expressions: _col0 (type: bigint) outputColumnNames: _col0 Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE Group By Operator keys: _col0 (type: bigint) mode: hash outputColumnNames: _col0 Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE 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 Stage: Stage-1 Map Reduce Map Operator Tree: TableScan alias: b Statistics: Num rows: 29 Data size: 5812 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: key is not null (type: boolean) Statistics: Num rows: 15 Data size: 3006 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator sort order: Statistics: Num rows: 15 Data size: 3006 Basic stats: COMPLETE Column stats: NONE value expressions: key (type: string), value (type: string) TableScan Reduce Output Operator sort order: Statistics: Num rows: 0 Data size: 0 Basic stats: NONE Column stats: NONE Reduce Operator Tree: Join Operator condition map: Left Semi Join 0 to 1 condition expressions: 0 {VALUE._col0} {VALUE._col1} 1 outputColumnNames: _col0, _col1 Statistics: Num rows: 16 Data size: 3306 Basic stats: COMPLETE Column stats: NONE 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 Stage: Stage-2 Map Reduce Map Operator Tree: TableScan Reduce Output Operator key expressions: _col0 (type: string), _col1 (type: string), _col0 (type: string) sort order: +++ Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col0 (type: string) Statistics: Num rows: 16 Data size: 3306 Basic stats: COMPLETE Column stats: NONE TableScan alias: a Statistics: Num rows: 29 Data size: 5812 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: ((value > 'val_11') and key is not null) (type: boolean) Statistics: Num rows: 5 Data size: 1002 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string), key (type: string) outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 5 Data size: 1002 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string) sort order: +++ Map-reduce partition columns: _col0 (type: string), _col1 (type: string), _col2 (type: string) Statistics: Num rows: 5 Data size: 1002 Basic stats: COMPLETE Column stats: NONE Reduce Operator Tree: Join Operator condition map: Left Outer Join0 to 1 condition expressions: 0 {KEY.reducesinkkey0} {KEY.reducesinkkey1} 1 {KEY.reducesinkkey0} outputColumnNames: _col0, _col1, _col5 Statistics: Num rows: 17 Data size: 3636 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: _col5 is null (type: boolean) Statistics: Num rows: 8 Data size: 1711 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: string), _col1 (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 8 Data size: 1711 Basic stats: COMPLETE Column stats: NONE 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 Stage: Stage-0 Fetch Operator limit: -1 Processor Tree: ListSink Warning: Shuffle Join JOIN[42][tables = [b, sq_1_notin_nullcheck]] in Stage 'Stage-5:MAPRED' is a cross product Warning: Shuffle Join JOIN[18][tables = [b, sq_1_notin_nullcheck]] in Stage 'Stage-1:MAPRED' is a cross product PREHOOK: query: select * from cv2 where cv2.key in (select key from cv2 c where c.key < '11') PREHOOK: type: QUERY PREHOOK: Input: default@cv2 PREHOOK: Input: default@src #### A masked pattern was here #### POSTHOOK: query: select * from cv2 where cv2.key in (select key from cv2 c where c.key < '11') POSTHOOK: type: QUERY POSTHOOK: Input: default@cv2 POSTHOOK: Input: default@src #### A masked pattern was here #### 0 val_0 0 val_0 0 val_0 10 val_10 100 val_100 100 val_100 103 val_103 103 val_103 104 val_104 104 val_104 105 val_105 PREHOOK: query: -- in where + having create view cv3 as select key, value, count(*) from src b where b.key in (select key from src where src.key > '8') group by key, value having count(*) in (select count(*) from src s1 where s1.key > '9' group by s1.key ) PREHOOK: type: CREATEVIEW PREHOOK: Input: default@src PREHOOK: Output: database:default PREHOOK: Output: default@cv3 POSTHOOK: query: -- in where + having create view cv3 as select key, value, count(*) from src b where b.key in (select key from src where src.key > '8') group by key, value having count(*) in (select count(*) from src s1 where s1.key > '9' group by s1.key ) POSTHOOK: type: CREATEVIEW POSTHOOK: Input: default@src POSTHOOK: Output: database:default POSTHOOK: Output: default@cv3 PREHOOK: query: select * from cv3 PREHOOK: type: QUERY PREHOOK: Input: default@cv3 PREHOOK: Input: default@src #### A masked pattern was here #### POSTHOOK: query: select * from cv3 POSTHOOK: type: QUERY POSTHOOK: Input: default@cv3 POSTHOOK: Input: default@src #### A masked pattern was here #### 80 val_80 1 82 val_82 1 83 val_83 2 84 val_84 2 85 val_85 1 86 val_86 1 87 val_87 1 9 val_9 1 90 val_90 3 92 val_92 1 95 val_95 2 96 val_96 1 97 val_97 2 98 val_98 2 PREHOOK: query: -- join of subquery views select * from cv3 where cv3.key in (select key from cv1) PREHOOK: type: QUERY PREHOOK: Input: default@cv1 PREHOOK: Input: default@cv3 PREHOOK: Input: default@src #### A masked pattern was here #### POSTHOOK: query: -- join of subquery views select * from cv3 where cv3.key in (select key from cv1) POSTHOOK: type: QUERY POSTHOOK: Input: default@cv1 POSTHOOK: Input: default@cv3 POSTHOOK: Input: default@src #### A masked pattern was here #### 90 val_90 3 92 val_92 1 95 val_95 2 96 val_96 1 97 val_97 2 98 val_98 2