HIVE-19532 : fix tests for master-txnstats branch - fix one more out (Sergey Shelukhin)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/7bd688b2 Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/7bd688b2 Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/7bd688b2 Branch: refs/heads/master Commit: 7bd688b27a6988c9a242015eeb4450784c164049 Parents: 9f9ae73 Author: sergey <[email protected]> Authored: Tue Jul 24 12:39:25 2018 -0700 Committer: sergey <[email protected]> Committed: Tue Jul 24 12:39:25 2018 -0700 ---------------------------------------------------------------------- .../test/queries/clientpositive/stats_part2.q | 12 +++------ .../results/clientpositive/stats_part2.q.out | 28 ++++++++++---------- 2 files changed, 17 insertions(+), 23 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/7bd688b2/ql/src/test/queries/clientpositive/stats_part2.q ---------------------------------------------------------------------- diff --git a/ql/src/test/queries/clientpositive/stats_part2.q b/ql/src/test/queries/clientpositive/stats_part2.q index 24be218..068e928 100644 --- a/ql/src/test/queries/clientpositive/stats_part2.q +++ b/ql/src/test/queries/clientpositive/stats_part2.q @@ -15,6 +15,8 @@ set hive.support.concurrency=true; set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager; set hive.query.results.cache.enabled=false; +set metastore.aggregate.stats.cache.enabled=false; + -- create source. drop table if exists mysource; create table mysource (p int, key int, value string); @@ -22,22 +24,14 @@ insert into mysource values (100,20,'value20'), (101,40,'string40'), (102,50,'st insert into mysource values (100,21,'value21'), (101,41,'value41'), (102,51,'value51'); -- test partitioned table -drop table if exists stats_partitioned; +drop table if exists stats_part; ---create table stats_part(key int,value string) partitioned by (p int) stored as orc; create table stats_part(key int,value string) partitioned by (p int) stored as orc tblproperties ("transactional"="true"); ---create table stats_part(key int,value string) partitioned by (p int) stored as orc tblproperties ("transactional"="true", "transactional_properties"="insert_only"); ---explain select count(*) from stats_part; ---select count(*) from stats_part; ---explain select count(*) from stats_part where p = 100; ---select count(*) from stats_part where p = 100; explain select count(*) from stats_part where p > 100; explain select max(key) from stats_part where p > 100; ---select count(*) from stats_part where p > 100; desc formatted stats_part; ---explain insert into table stats_part partition(p=100) select distinct key, value from mysource where p == 100; insert into table stats_part partition(p=100) select distinct key, value from mysource where p == 100; insert into table stats_part partition(p=101) select distinct key, value from mysource where p == 101; insert into table stats_part partition(p=102) select distinct key, value from mysource where p == 102; http://git-wip-us.apache.org/repos/asf/hive/blob/7bd688b2/ql/src/test/results/clientpositive/stats_part2.q.out ---------------------------------------------------------------------- diff --git a/ql/src/test/results/clientpositive/stats_part2.q.out b/ql/src/test/results/clientpositive/stats_part2.q.out index 9c22ce7..dfdf7b3 100644 --- a/ql/src/test/results/clientpositive/stats_part2.q.out +++ b/ql/src/test/results/clientpositive/stats_part2.q.out @@ -32,9 +32,9 @@ POSTHOOK: Output: default@mysource POSTHOOK: Lineage: mysource.key SCRIPT [] POSTHOOK: Lineage: mysource.p SCRIPT [] POSTHOOK: Lineage: mysource.value SCRIPT [] -PREHOOK: query: drop table if exists stats_partitioned +PREHOOK: query: drop table if exists stats_part PREHOOK: type: DROPTABLE -POSTHOOK: query: drop table if exists stats_partitioned +POSTHOOK: query: drop table if exists stats_part POSTHOOK: type: DROPTABLE PREHOOK: query: create table stats_part(key int,value string) partitioned by (p int) stored as orc tblproperties ("transactional"="true") PREHOOK: type: CREATETABLE @@ -594,19 +594,19 @@ STAGE PLANS: TableScan alias: stats_part filterExpr: (p > 100) (type: boolean) - Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: PARTIAL + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: key (type: int) outputColumnNames: key - Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: PARTIAL + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE Group By Operator aggregations: max(key) mode: hash outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: PARTIAL + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator sort order: - Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: PARTIAL + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col0 (type: int) Execution mode: vectorized Reduce Operator Tree: @@ -614,10 +614,10 @@ STAGE PLANS: aggregations: max(VALUE._col0) mode: mergepartial outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: PARTIAL + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: PARTIAL + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -1185,19 +1185,19 @@ STAGE PLANS: TableScan alias: stats_part filterExpr: (p > 100) (type: boolean) - Statistics: Num rows: 5 Data size: 20 Basic stats: COMPLETE Column stats: PARTIAL + Statistics: Num rows: 5 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: key (type: int) outputColumnNames: key - Statistics: Num rows: 5 Data size: 20 Basic stats: COMPLETE Column stats: PARTIAL + Statistics: Num rows: 5 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE Group By Operator aggregations: max(key) mode: hash outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: PARTIAL + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator sort order: - Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: PARTIAL + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col0 (type: int) Execution mode: vectorized Reduce Operator Tree: @@ -1205,10 +1205,10 @@ STAGE PLANS: aggregations: max(VALUE._col0) mode: mergepartial outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: PARTIAL + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: PARTIAL + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
