diff --git a/ql/src/test/queries/clientpositive/parquet_ppd_boolean.q b/ql/src/test/queries/clientpositive/parquet_ppd_boolean.q new file mode 100644 index 0000000..9a04a19 --- /dev/null +++ b/ql/src/test/queries/clientpositive/parquet_ppd_boolean.q @@ -0,0 +1,34 @@ +SET hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat; +SET mapred.min.split.size=1000; +SET mapred.max.split.size=5000; + +create table newtypestbl(c char(10), v varchar(10), d decimal(5,3), b boolean) stored as parquet; + +insert overwrite table newtypestbl select * from (select cast("apple" as char(10)), cast("bee" as varchar(10)), 0.22, true from src src1 union all select cast("hello" as char(10)), cast("world" as varchar(10)), 11.22, false from src src2) uniontbl; + +set hive.optimize.index.filter=false; + +-- char data types (EQUAL, NOT_EQUAL, LESS_THAN, LESS_THAN_EQUALS, IN, BETWEEN tests) +select sum(hash(*)) from newtypestbl where b=true; + +set hive.optimize.index.filter=true; +select sum(hash(*)) from newtypestbl where b=false; + +set hive.optimize.index.filter=false; +select sum(hash(*)) from newtypestbl where b!=true; + +set hive.optimize.index.filter=true; +select sum(hash(*)) from newtypestbl where b!=false; + +set hive.optimize.index.filter=false; +select sum(hash(*)) from newtypestbl where b2 limit 1; SET hive.optimize.index.filter=true; -SET hive.optimize.ppd=true; +SELECT * FROM tbl_pred WHERE t>2 limit 1; +SET hive.optimize.index.filter=false; + +SELECT SUM(HASH(t)) FROM tbl_pred + WHERE t IS NOT NULL + AND t < 0 + AND t > -2; + +SET hive.optimize.index.filter=true; +SELECT SUM(HASH(t)) FROM tbl_pred + WHERE t IS NOT NULL + AND t < 0 + AND t > -2; +SET hive.optimize.index.filter=false; + +EXPLAIN SELECT SUM(HASH(t)) FROM tbl_pred + WHERE t IS NOT NULL + AND t < 0 + AND t > -2; + +SET hive.optimize.index.filter=true; +EXPLAIN SELECT SUM(HASH(t)) FROM tbl_pred + WHERE t IS NOT NULL + AND t < 0 + AND t > -2; +SET hive.optimize.index.filter=false; + +SELECT t, s FROM tbl_pred + WHERE t <=> -1 + AND s IS NOT NULL + AND s LIKE 'bob%' + ; --- Test predicate with partitioned columns -CREATE TABLE part1 (id int, content string) PARTITIONED BY (p string) STORED AS PARQUET; -ALTER TABLE part1 ADD PARTITION (p='p1'); -INSERT INTO TABLE part1 PARTITION (p='p1') VALUES (1, 'a'), (2, 'b'); -SELECT * FROM part1 WHERE p='p1'; -DROP TABLE part1 PURGE; \ No newline at end of file +SET hive.optimize.index.filter=true; +SELECT t, s FROM tbl_pred + WHERE t <=> -1 + AND s IS NOT NULL + AND s LIKE 'bob%' + ; +SET hive.optimize.index.filter=false; + +EXPLAIN SELECT t, s FROM tbl_pred + WHERE t <=> -1 + AND s IS NOT NULL + AND s LIKE 'bob%' + ; + +SET hive.optimize.index.filter=true; +EXPLAIN SELECT t, s FROM tbl_pred + WHERE t <=> -1 + AND s IS NOT NULL + AND s LIKE 'bob%' + ; +SET hive.optimize.index.filter=false; + +SELECT t, s FROM tbl_pred + WHERE s IS NOT NULL + AND s LIKE 'bob%' + AND t NOT IN (-1,-2,-3) + AND t BETWEEN 25 AND 30 + SORT BY t,s; + +set hive.optimize.index.filter=true; +SELECT t, s FROM tbl_pred + WHERE s IS NOT NULL + AND s LIKE 'bob%' + AND t NOT IN (-1,-2,-3) + AND t BETWEEN 25 AND 30 + SORT BY t,s; +set hive.optimize.index.filter=false; + +EXPLAIN SELECT t, s FROM tbl_pred + WHERE s IS NOT NULL + AND s LIKE 'bob%' + AND t NOT IN (-1,-2,-3) + AND t BETWEEN 25 AND 30 + SORT BY t,s; + +SET hive.optimize.index.filter=true; +EXPLAIN SELECT t, s FROM tbl_pred + WHERE s IS NOT NULL + AND s LIKE 'bob%' + AND t NOT IN (-1,-2,-3) + AND t BETWEEN 25 AND 30 + SORT BY t,s; +SET hive.optimize.index.filter=false; + +SELECT t, si, d, s FROM tbl_pred + WHERE d >= ROUND(9.99) + AND d < 12 + AND t IS NOT NULL + AND s LIKE '%son' + AND s NOT LIKE '%car%' + AND t > 0 + AND si BETWEEN 300 AND 400 + ORDER BY s DESC + LIMIT 3; + +SET hive.optimize.index.filter=true; +SELECT t, si, d, s FROM tbl_pred + WHERE d >= ROUND(9.99) + AND d < 12 + AND t IS NOT NULL + AND s LIKE '%son' + AND s NOT LIKE '%car%' + AND t > 0 + AND si BETWEEN 300 AND 400 + ORDER BY s DESC + LIMIT 3; +SET hive.optimize.index.filter=false; + +EXPLAIN SELECT t, si, d, s FROM tbl_pred + WHERE d >= ROUND(9.99) + AND d < 12 + AND t IS NOT NULL + AND s LIKE '%son' + AND s NOT LIKE '%car%' + AND t > 0 + AND si BETWEEN 300 AND 400 + ORDER BY s DESC + LIMIT 3; + +SET hive.optimize.index.filter=true; +EXPLAIN SELECT t, si, d, s FROM tbl_pred + WHERE d >= ROUND(9.99) + AND d < 12 + AND t IS NOT NULL + AND s LIKE '%son' + AND s NOT LIKE '%car%' + AND t > 0 + AND si BETWEEN 300 AND 400 + ORDER BY s DESC + LIMIT 3; +SET hive.optimize.index.filter=false; + +SELECT t, si, d, s FROM tbl_pred + WHERE t > 10 + AND t <> 101 + AND d >= ROUND(9.99) + AND d < 12 + AND t IS NOT NULL + AND s LIKE '%son' + AND s NOT LIKE '%car%' + AND t > 0 + AND si BETWEEN 300 AND 400 + SORT BY s DESC + LIMIT 3; + +SET hive.optimize.index.filter=true; +SELECT t, si, d, s FROM tbl_pred + WHERE t > 10 + AND t <> 101 + AND d >= ROUND(9.99) + AND d < 12 + AND t IS NOT NULL + AND s LIKE '%son' + AND s NOT LIKE '%car%' + AND t > 0 + AND si BETWEEN 300 AND 400 + SORT BY s DESC + LIMIT 3; +SET hive.optimize.index.filter=false; + +EXPLAIN SELECT t, si, d, s FROM tbl_pred + WHERE t > 10 + AND t <> 101 + AND d >= ROUND(9.99) + AND d < 12 + AND t IS NOT NULL + AND s LIKE '%son' + AND s NOT LIKE '%car%' + AND t > 0 + AND si BETWEEN 300 AND 400 + SORT BY s DESC + LIMIT 3; + +SET hive.optimize.index.filter=true; +EXPLAIN SELECT t, si, d, s FROM tbl_pred + WHERE t > 10 + AND t <> 101 + AND d >= ROUND(9.99) + AND d < 12 + AND t IS NOT NULL + AND s LIKE '%son' + AND s NOT LIKE '%car%' + AND t > 0 + AND si BETWEEN 300 AND 400 + SORT BY s DESC + LIMIT 3; +SET hive.optimize.index.filter=false; diff --git a/ql/src/test/results/clientpositive/parquet_ppd_boolean.q.out b/ql/src/test/results/clientpositive/parquet_ppd_boolean.q.out new file mode 100644 index 0000000..d8ef053 --- /dev/null +++ b/ql/src/test/results/clientpositive/parquet_ppd_boolean.q.out @@ -0,0 +1,94 @@ +PREHOOK: query: create table newtypestbl(c char(10), v varchar(10), d decimal(5,3), b boolean) stored as parquet +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@newtypestbl +POSTHOOK: query: create table newtypestbl(c char(10), v varchar(10), d decimal(5,3), b boolean) stored as parquet +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@newtypestbl +PREHOOK: query: insert overwrite table newtypestbl select * from (select cast("apple" as char(10)), cast("bee" as varchar(10)), 0.22, true from src src1 union all select cast("hello" as char(10)), cast("world" as varchar(10)), 11.22, false from src src2) uniontbl +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@newtypestbl +POSTHOOK: query: insert overwrite table newtypestbl select * from (select cast("apple" as char(10)), cast("bee" as varchar(10)), 0.22, true from src src1 union all select cast("hello" as char(10)), cast("world" as varchar(10)), 11.22, false from src src2) uniontbl +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Output: default@newtypestbl +POSTHOOK: Lineage: newtypestbl.b EXPRESSION [] +POSTHOOK: Lineage: newtypestbl.c EXPRESSION [] +POSTHOOK: Lineage: newtypestbl.d EXPRESSION [] +POSTHOOK: Lineage: newtypestbl.v EXPRESSION [] +PREHOOK: query: -- char data types (EQUAL, NOT_EQUAL, LESS_THAN, LESS_THAN_EQUALS, IN, BETWEEN tests) +select sum(hash(*)) from newtypestbl where b=true +PREHOOK: type: QUERY +PREHOOK: Input: default@newtypestbl +#### A masked pattern was here #### +POSTHOOK: query: -- char data types (EQUAL, NOT_EQUAL, LESS_THAN, LESS_THAN_EQUALS, IN, BETWEEN tests) +select sum(hash(*)) from newtypestbl where b=true +POSTHOOK: type: QUERY +POSTHOOK: Input: default@newtypestbl +#### A masked pattern was here #### +-252951953500 +PREHOOK: query: select sum(hash(*)) from newtypestbl where b=false +PREHOOK: type: QUERY +PREHOOK: Input: default@newtypestbl +#### A masked pattern was here #### +POSTHOOK: query: select sum(hash(*)) from newtypestbl where b=false +POSTHOOK: type: QUERY +POSTHOOK: Input: default@newtypestbl +#### A masked pattern was here #### +334427776000 +PREHOOK: query: select sum(hash(*)) from newtypestbl where b!=true +PREHOOK: type: QUERY +PREHOOK: Input: default@newtypestbl +#### A masked pattern was here #### +POSTHOOK: query: select sum(hash(*)) from newtypestbl where b!=true +POSTHOOK: type: QUERY +POSTHOOK: Input: default@newtypestbl +#### A masked pattern was here #### +334427776000 +PREHOOK: query: select sum(hash(*)) from newtypestbl where b!=false +PREHOOK: type: QUERY +PREHOOK: Input: default@newtypestbl +#### A masked pattern was here #### +POSTHOOK: query: select sum(hash(*)) from newtypestbl where b!=false +POSTHOOK: type: QUERY +POSTHOOK: Input: default@newtypestbl +#### A masked pattern was here #### +-252951953500 +PREHOOK: query: select sum(hash(*)) from newtypestbl where b2 limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@tbl_pred +#### A masked pattern was here #### +POSTHOOK: query: SELECT * FROM tbl_pred WHERE t>2 limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tbl_pred +#### A masked pattern was here #### +124 336 65664 4294967435 74.72 42.47 true bob davidson 2013-03-01 09:11:58.703302 45.4 yard duty +PREHOOK: query: SELECT * FROM tbl_pred WHERE t>2 limit 1 +PREHOOK: type: QUERY +PREHOOK: Input: default@tbl_pred +#### A masked pattern was here #### +POSTHOOK: query: SELECT * FROM tbl_pred WHERE t>2 limit 1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tbl_pred +#### A masked pattern was here #### +124 336 65664 4294967435 74.72 42.47 true bob davidson 2013-03-01 09:11:58.703302 45.4 yard duty +PREHOOK: query: SELECT SUM(HASH(t)) FROM tbl_pred + WHERE t IS NOT NULL + AND t < 0 + AND t > -2 +PREHOOK: type: QUERY +PREHOOK: Input: default@tbl_pred +#### A masked pattern was here #### +POSTHOOK: query: SELECT SUM(HASH(t)) FROM tbl_pred + WHERE t IS NOT NULL + AND t < 0 + AND t > -2 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tbl_pred +#### A masked pattern was here #### +-8 +PREHOOK: query: SELECT SUM(HASH(t)) FROM tbl_pred + WHERE t IS NOT NULL + AND t < 0 + AND t > -2 +PREHOOK: type: QUERY +PREHOOK: Input: default@tbl_pred +#### A masked pattern was here #### +POSTHOOK: query: SELECT SUM(HASH(t)) FROM tbl_pred + WHERE t IS NOT NULL + AND t < 0 + AND t > -2 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tbl_pred +#### A masked pattern was here #### +-8 +PREHOOK: query: EXPLAIN SELECT SUM(HASH(t)) FROM tbl_pred + WHERE t IS NOT NULL + AND t < 0 + AND t > -2 +PREHOOK: type: QUERY +POSTHOOK: query: EXPLAIN SELECT SUM(HASH(t)) FROM tbl_pred + WHERE t IS NOT NULL + AND t < 0 + AND t > -2 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-0 depends on stages: Stage-1 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: tbl_pred + Statistics: Num rows: 1049 Data size: 11539 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((t < 0) and (UDFToInteger(t) > -2)) (type: boolean) + Statistics: Num rows: 116 Data size: 1276 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: hash(t) (type: int) + outputColumnNames: _col0 + Statistics: Num rows: 116 Data size: 1276 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col0) + 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: sum(VALUE._col0) + mode: mergepartial + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + +PREHOOK: query: EXPLAIN SELECT SUM(HASH(t)) FROM tbl_pred + WHERE t IS NOT NULL + AND t < 0 + AND t > -2 +PREHOOK: type: QUERY +POSTHOOK: query: EXPLAIN SELECT SUM(HASH(t)) FROM tbl_pred + WHERE t IS NOT NULL + AND t < 0 + AND t > -2 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-0 depends on stages: Stage-1 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: tbl_pred + filterExpr: ((t < 0) and (UDFToInteger(t) > -2)) (type: boolean) + Statistics: Num rows: 1049 Data size: 11539 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((t < 0) and (UDFToInteger(t) > -2)) (type: boolean) + Statistics: Num rows: 116 Data size: 1276 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: hash(t) (type: int) + outputColumnNames: _col0 + Statistics: Num rows: 116 Data size: 1276 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: sum(_col0) + 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: sum(VALUE._col0) + mode: mergepartial + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + +PREHOOK: query: SELECT t, s FROM tbl_pred + WHERE t <=> -1 + AND s IS NOT NULL + AND s LIKE 'bob%' +PREHOOK: type: QUERY +PREHOOK: Input: default@tbl_pred +#### A masked pattern was here #### +POSTHOOK: query: SELECT t, s FROM tbl_pred + WHERE t <=> -1 + AND s IS NOT NULL + AND s LIKE 'bob%' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tbl_pred +#### A masked pattern was here #### +-1 bob laertes +-1 bob young +PREHOOK: query: SELECT t, s FROM tbl_pred + WHERE t <=> -1 + AND s IS NOT NULL + AND s LIKE 'bob%' +PREHOOK: type: QUERY +PREHOOK: Input: default@tbl_pred +#### A masked pattern was here #### +POSTHOOK: query: SELECT t, s FROM tbl_pred + WHERE t <=> -1 + AND s IS NOT NULL + AND s LIKE 'bob%' +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tbl_pred +#### A masked pattern was here #### +-1 bob laertes +-1 bob young +PREHOOK: query: EXPLAIN SELECT t, s FROM tbl_pred + WHERE t <=> -1 + AND s IS NOT NULL + AND s LIKE 'bob%' +PREHOOK: type: QUERY +POSTHOOK: query: EXPLAIN SELECT t, s FROM tbl_pred + WHERE t <=> -1 + AND s IS NOT NULL + AND s LIKE 'bob%' +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-0 depends on stages: Stage-1 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: tbl_pred + Statistics: Num rows: 1049 Data size: 11539 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((t = -1) and s is not null) and (s like 'bob%')) (type: boolean) + Statistics: Num rows: 131 Data size: 1441 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: -1 (type: tinyint), s (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 131 Data size: 1441 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 131 Data size: 1441 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-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + +PREHOOK: query: EXPLAIN SELECT t, s FROM tbl_pred + WHERE t <=> -1 + AND s IS NOT NULL + AND s LIKE 'bob%' +PREHOOK: type: QUERY +POSTHOOK: query: EXPLAIN SELECT t, s FROM tbl_pred + WHERE t <=> -1 + AND s IS NOT NULL + AND s LIKE 'bob%' +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-0 depends on stages: Stage-1 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: tbl_pred + filterExpr: (((t = -1) and s is not null) and (s like 'bob%')) (type: boolean) + Statistics: Num rows: 1049 Data size: 11539 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((t = -1) and s is not null) and (s like 'bob%')) (type: boolean) + Statistics: Num rows: 131 Data size: 1441 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: -1 (type: tinyint), s (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 131 Data size: 1441 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 131 Data size: 1441 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-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + +PREHOOK: query: SELECT t, s FROM tbl_pred + WHERE s IS NOT NULL + AND s LIKE 'bob%' + AND t NOT IN (-1,-2,-3) + AND t BETWEEN 25 AND 30 + SORT BY t,s +PREHOOK: type: QUERY +PREHOOK: Input: default@tbl_pred +#### A masked pattern was here #### +POSTHOOK: query: SELECT t, s FROM tbl_pred + WHERE s IS NOT NULL + AND s LIKE 'bob%' + AND t NOT IN (-1,-2,-3) + AND t BETWEEN 25 AND 30 + SORT BY t,s +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tbl_pred +#### A masked pattern was here #### +26 bob ovid +26 bob quirinius +27 bob ovid +PREHOOK: query: SELECT t, s FROM tbl_pred + WHERE s IS NOT NULL + AND s LIKE 'bob%' + AND t NOT IN (-1,-2,-3) + AND t BETWEEN 25 AND 30 + SORT BY t,s +PREHOOK: type: QUERY +PREHOOK: Input: default@tbl_pred +#### A masked pattern was here #### +POSTHOOK: query: SELECT t, s FROM tbl_pred + WHERE s IS NOT NULL + AND s LIKE 'bob%' + AND t NOT IN (-1,-2,-3) + AND t BETWEEN 25 AND 30 + SORT BY t,s +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tbl_pred +#### A masked pattern was here #### +26 bob ovid +26 bob quirinius +27 bob ovid +PREHOOK: query: EXPLAIN SELECT t, s FROM tbl_pred + WHERE s IS NOT NULL + AND s LIKE 'bob%' + AND t NOT IN (-1,-2,-3) + AND t BETWEEN 25 AND 30 + SORT BY t,s +PREHOOK: type: QUERY +POSTHOOK: query: EXPLAIN SELECT t, s FROM tbl_pred + WHERE s IS NOT NULL + AND s LIKE 'bob%' + AND t NOT IN (-1,-2,-3) + AND t BETWEEN 25 AND 30 + SORT BY t,s +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-0 depends on stages: Stage-1 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: tbl_pred + Statistics: Num rows: 1049 Data size: 11539 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((s is not null and (s like 'bob%')) and (not (t) IN (-1, -2, -3))) and t BETWEEN 25 AND 30) (type: boolean) + Statistics: Num rows: 65 Data size: 715 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: t (type: tinyint), s (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 65 Data size: 715 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: tinyint), _col1 (type: string) + sort order: ++ + Statistics: Num rows: 65 Data size: 715 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: tinyint), KEY.reducesinkkey1 (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 65 Data size: 715 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 65 Data size: 715 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-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + +PREHOOK: query: EXPLAIN SELECT t, s FROM tbl_pred + WHERE s IS NOT NULL + AND s LIKE 'bob%' + AND t NOT IN (-1,-2,-3) + AND t BETWEEN 25 AND 30 + SORT BY t,s +PREHOOK: type: QUERY +POSTHOOK: query: EXPLAIN SELECT t, s FROM tbl_pred + WHERE s IS NOT NULL + AND s LIKE 'bob%' + AND t NOT IN (-1,-2,-3) + AND t BETWEEN 25 AND 30 + SORT BY t,s +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-0 depends on stages: Stage-1 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: tbl_pred + filterExpr: (((s is not null and (s like 'bob%')) and (not (t) IN (-1, -2, -3))) and t BETWEEN 25 AND 30) (type: boolean) + Statistics: Num rows: 1049 Data size: 11539 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((s is not null and (s like 'bob%')) and (not (t) IN (-1, -2, -3))) and t BETWEEN 25 AND 30) (type: boolean) + Statistics: Num rows: 65 Data size: 715 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: t (type: tinyint), s (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 65 Data size: 715 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: tinyint), _col1 (type: string) + sort order: ++ + Statistics: Num rows: 65 Data size: 715 Basic stats: COMPLETE Column stats: NONE + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: tinyint), KEY.reducesinkkey1 (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 65 Data size: 715 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 65 Data size: 715 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-0 + Fetch Operator + limit: -1 + Processor Tree: + ListSink + +PREHOOK: query: SELECT t, si, d, s FROM tbl_pred + WHERE d >= ROUND(9.99) + AND d < 12 + AND t IS NOT NULL + AND s LIKE '%son' + AND s NOT LIKE '%car%' + AND t > 0 + AND si BETWEEN 300 AND 400 + ORDER BY s DESC + LIMIT 3 +PREHOOK: type: QUERY +PREHOOK: Input: default@tbl_pred +#### A masked pattern was here #### +POSTHOOK: query: SELECT t, si, d, s FROM tbl_pred + WHERE d >= ROUND(9.99) + AND d < 12 + AND t IS NOT NULL + AND s LIKE '%son' + AND s NOT LIKE '%car%' + AND t > 0 + AND si BETWEEN 300 AND 400 + ORDER BY s DESC + LIMIT 3 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tbl_pred +#### A masked pattern was here #### +101 327 11.48 gabriella ellison +15 334 11.12 jessica robinson +7 320 11.54 bob ellison +PREHOOK: query: SELECT t, si, d, s FROM tbl_pred + WHERE d >= ROUND(9.99) + AND d < 12 + AND t IS NOT NULL + AND s LIKE '%son' + AND s NOT LIKE '%car%' + AND t > 0 + AND si BETWEEN 300 AND 400 + ORDER BY s DESC + LIMIT 3 +PREHOOK: type: QUERY +PREHOOK: Input: default@tbl_pred +#### A masked pattern was here #### +POSTHOOK: query: SELECT t, si, d, s FROM tbl_pred + WHERE d >= ROUND(9.99) + AND d < 12 + AND t IS NOT NULL + AND s LIKE '%son' + AND s NOT LIKE '%car%' + AND t > 0 + AND si BETWEEN 300 AND 400 + ORDER BY s DESC + LIMIT 3 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tbl_pred +#### A masked pattern was here #### +101 327 11.48 gabriella ellison +15 334 11.12 jessica robinson +7 320 11.54 bob ellison +PREHOOK: query: EXPLAIN SELECT t, si, d, s FROM tbl_pred + WHERE d >= ROUND(9.99) + AND d < 12 + AND t IS NOT NULL + AND s LIKE '%son' + AND s NOT LIKE '%car%' + AND t > 0 + AND si BETWEEN 300 AND 400 + ORDER BY s DESC + LIMIT 3 +PREHOOK: type: QUERY +POSTHOOK: query: EXPLAIN SELECT t, si, d, s FROM tbl_pred + WHERE d >= ROUND(9.99) + AND d < 12 + AND t IS NOT NULL + AND s LIKE '%son' + AND s NOT LIKE '%car%' + AND t > 0 + AND si BETWEEN 300 AND 400 + ORDER BY s DESC + LIMIT 3 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-0 depends on stages: Stage-1 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: tbl_pred + Statistics: Num rows: 1049 Data size: 11539 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((((((d >= 10.0) and (d < 12.0)) and t is not null) and (s like '%son')) and (not (s like '%car%'))) and (t > 0)) and si BETWEEN 300 AND 400) (type: boolean) + Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: t (type: tinyint), si (type: smallint), d (type: double), s (type: string) + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col3 (type: string) + sort order: - + Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: tinyint), _col1 (type: smallint), _col2 (type: double) + Reduce Operator Tree: + Select Operator + expressions: VALUE._col0 (type: tinyint), VALUE._col1 (type: smallint), VALUE._col2 (type: double), KEY.reducesinkkey0 (type: string) + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 3 + Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 2 Data size: 22 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-0 + Fetch Operator + limit: 3 + Processor Tree: + ListSink + +PREHOOK: query: EXPLAIN SELECT t, si, d, s FROM tbl_pred + WHERE d >= ROUND(9.99) + AND d < 12 + AND t IS NOT NULL + AND s LIKE '%son' + AND s NOT LIKE '%car%' + AND t > 0 + AND si BETWEEN 300 AND 400 + ORDER BY s DESC + LIMIT 3 +PREHOOK: type: QUERY +POSTHOOK: query: EXPLAIN SELECT t, si, d, s FROM tbl_pred + WHERE d >= ROUND(9.99) + AND d < 12 + AND t IS NOT NULL + AND s LIKE '%son' + AND s NOT LIKE '%car%' + AND t > 0 + AND si BETWEEN 300 AND 400 + ORDER BY s DESC + LIMIT 3 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-0 depends on stages: Stage-1 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: tbl_pred + filterExpr: (((((((d >= 10.0) and (d < 12.0)) and t is not null) and (s like '%son')) and (not (s like '%car%'))) and (t > 0)) and si BETWEEN 300 AND 400) (type: boolean) + Statistics: Num rows: 1049 Data size: 11539 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((((((d >= 10.0) and (d < 12.0)) and t is not null) and (s like '%son')) and (not (s like '%car%'))) and (t > 0)) and si BETWEEN 300 AND 400) (type: boolean) + Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: t (type: tinyint), si (type: smallint), d (type: double), s (type: string) + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col3 (type: string) + sort order: - + Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: tinyint), _col1 (type: smallint), _col2 (type: double) + Reduce Operator Tree: + Select Operator + expressions: VALUE._col0 (type: tinyint), VALUE._col1 (type: smallint), VALUE._col2 (type: double), KEY.reducesinkkey0 (type: string) + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 3 + Statistics: Num rows: 2 Data size: 22 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 2 Data size: 22 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-0 + Fetch Operator + limit: 3 + Processor Tree: + ListSink + +PREHOOK: query: SELECT t, si, d, s FROM tbl_pred + WHERE t > 10 + AND t <> 101 + AND d >= ROUND(9.99) + AND d < 12 + AND t IS NOT NULL + AND s LIKE '%son' + AND s NOT LIKE '%car%' + AND t > 0 + AND si BETWEEN 300 AND 400 + SORT BY s DESC + LIMIT 3 +PREHOOK: type: QUERY +PREHOOK: Input: default@tbl_pred +#### A masked pattern was here #### +POSTHOOK: query: SELECT t, si, d, s FROM tbl_pred + WHERE t > 10 + AND t <> 101 + AND d >= ROUND(9.99) + AND d < 12 + AND t IS NOT NULL + AND s LIKE '%son' + AND s NOT LIKE '%car%' + AND t > 0 + AND si BETWEEN 300 AND 400 + SORT BY s DESC + LIMIT 3 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tbl_pred +#### A masked pattern was here #### +15 334 11.12 jessica robinson +PREHOOK: query: SELECT t, si, d, s FROM tbl_pred + WHERE t > 10 + AND t <> 101 + AND d >= ROUND(9.99) + AND d < 12 + AND t IS NOT NULL + AND s LIKE '%son' + AND s NOT LIKE '%car%' + AND t > 0 + AND si BETWEEN 300 AND 400 + SORT BY s DESC + LIMIT 3 +PREHOOK: type: QUERY +PREHOOK: Input: default@tbl_pred +#### A masked pattern was here #### +POSTHOOK: query: SELECT t, si, d, s FROM tbl_pred + WHERE t > 10 + AND t <> 101 + AND d >= ROUND(9.99) + AND d < 12 + AND t IS NOT NULL + AND s LIKE '%son' + AND s NOT LIKE '%car%' + AND t > 0 + AND si BETWEEN 300 AND 400 + SORT BY s DESC + LIMIT 3 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tbl_pred +#### A masked pattern was here #### +15 334 11.12 jessica robinson +PREHOOK: query: EXPLAIN SELECT t, si, d, s FROM tbl_pred + WHERE t > 10 + AND t <> 101 + AND d >= ROUND(9.99) + AND d < 12 + AND t IS NOT NULL + AND s LIKE '%son' + AND s NOT LIKE '%car%' + AND t > 0 + AND si BETWEEN 300 AND 400 + SORT BY s DESC + LIMIT 3 +PREHOOK: type: QUERY +POSTHOOK: query: EXPLAIN SELECT t, si, d, s FROM tbl_pred + WHERE t > 10 + AND t <> 101 + AND d >= ROUND(9.99) + AND d < 12 + AND t IS NOT NULL + AND s LIKE '%son' + AND s NOT LIKE '%car%' + AND t > 0 + AND si BETWEEN 300 AND 400 + SORT BY s DESC + LIMIT 3 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-0 depends on stages: Stage-2 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: tbl_pred + Statistics: Num rows: 1049 Data size: 11539 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((((((((t > 10) and (t <> 101)) and (d >= 10.0)) and (d < 12.0)) and t is not null) and (s like '%son')) and (not (s like '%car%'))) and (t > 0)) and si BETWEEN 300 AND 400) (type: boolean) + Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: t (type: tinyint), si (type: smallint), d (type: double), s (type: string) + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col3 (type: string) + sort order: - + Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: tinyint), _col1 (type: smallint), _col2 (type: double) + Reduce Operator Tree: + Select Operator + expressions: VALUE._col0 (type: tinyint), VALUE._col1 (type: smallint), VALUE._col2 (type: double), KEY.reducesinkkey0 (type: string) + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 3 + Statistics: Num rows: 1 Data size: 11 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: _col3 (type: string) + sort order: - + Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: tinyint), _col1 (type: smallint), _col2 (type: double) + Reduce Operator Tree: + Select Operator + expressions: VALUE._col0 (type: tinyint), VALUE._col1 (type: smallint), VALUE._col2 (type: double), KEY.reducesinkkey0 (type: string) + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 3 + Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 11 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-0 + Fetch Operator + limit: 3 + Processor Tree: + ListSink + +PREHOOK: query: EXPLAIN SELECT t, si, d, s FROM tbl_pred + WHERE t > 10 + AND t <> 101 + AND d >= ROUND(9.99) + AND d < 12 + AND t IS NOT NULL + AND s LIKE '%son' + AND s NOT LIKE '%car%' + AND t > 0 + AND si BETWEEN 300 AND 400 + SORT BY s DESC + LIMIT 3 +PREHOOK: type: QUERY +POSTHOOK: query: EXPLAIN SELECT t, si, d, s FROM tbl_pred + WHERE t > 10 + AND t <> 101 + AND d >= ROUND(9.99) + AND d < 12 + AND t IS NOT NULL + AND s LIKE '%son' + AND s NOT LIKE '%car%' + AND t > 0 + AND si BETWEEN 300 AND 400 + SORT BY s DESC + LIMIT 3 +POSTHOOK: type: QUERY +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-2 depends on stages: Stage-1 + Stage-0 depends on stages: Stage-2 + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Map Operator Tree: + TableScan + alias: tbl_pred + filterExpr: (((((((((t > 10) and (t <> 101)) and (d >= 10.0)) and (d < 12.0)) and t is not null) and (s like '%son')) and (not (s like '%car%'))) and (t > 0)) and si BETWEEN 300 AND 400) (type: boolean) + Statistics: Num rows: 1049 Data size: 11539 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: (((((((((t > 10) and (t <> 101)) and (d >= 10.0)) and (d < 12.0)) and t is not null) and (s like '%son')) and (not (s like '%car%'))) and (t > 0)) and si BETWEEN 300 AND 400) (type: boolean) + Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: t (type: tinyint), si (type: smallint), d (type: double), s (type: string) + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col3 (type: string) + sort order: - + Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: tinyint), _col1 (type: smallint), _col2 (type: double) + Reduce Operator Tree: + Select Operator + expressions: VALUE._col0 (type: tinyint), VALUE._col1 (type: smallint), VALUE._col2 (type: double), KEY.reducesinkkey0 (type: string) + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 3 + Statistics: Num rows: 1 Data size: 11 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: _col3 (type: string) + sort order: - + Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: tinyint), _col1 (type: smallint), _col2 (type: double) + Reduce Operator Tree: + Select Operator + expressions: VALUE._col0 (type: tinyint), VALUE._col1 (type: smallint), VALUE._col2 (type: double), KEY.reducesinkkey0 (type: string) + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 3 + Statistics: Num rows: 1 Data size: 11 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 11 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-0 + Fetch Operator + limit: 3 + Processor Tree: + ListSink +