hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gunt...@apache.org
Subject hive git commit: HIVE-16938: INFORMATION_SCHEMA usability: difficult to access # of table records (Gunther Hagleitner, reviewed by Thejas Nair)
Date Mon, 26 Jun 2017 20:21:42 GMT
Repository: hive
Updated Branches:
  refs/heads/master 309cb0d43 -> 055f6a0de


HIVE-16938: INFORMATION_SCHEMA usability: difficult to access # of table records (Gunther
Hagleitner, reviewed by Thejas Nair)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/055f6a0d
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/055f6a0d
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/055f6a0d

Branch: refs/heads/master
Commit: 055f6a0dee7ff0485773ad97f6bc11b62fd6f386
Parents: 309cb0d
Author: Gunther Hagleitner <gunther@apache.org>
Authored: Fri Jun 23 21:50:55 2017 -0700
Committer: Gunther Hagleitner <gunther@apache.org>
Committed: Mon Jun 26 09:28:27 2017 -0700

----------------------------------------------------------------------
 .../upgrade/hive/hive-schema-3.0.0.hive.sql     |  22 ++
 ql/src/test/queries/clientpositive/sysdb.q      |  16 +-
 .../results/clientpositive/llap/sysdb.q.out     | 292 +++++++++++++------
 3 files changed, 230 insertions(+), 100 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/055f6a0d/metastore/scripts/upgrade/hive/hive-schema-3.0.0.hive.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/hive/hive-schema-3.0.0.hive.sql b/metastore/scripts/upgrade/hive/hive-schema-3.0.0.hive.sql
index 70559cb..218ac04 100644
--- a/metastore/scripts/upgrade/hive/hive-schema-3.0.0.hive.sql
+++ b/metastore/scripts/upgrade/hive/hive-schema-3.0.0.hive.sql
@@ -924,6 +924,28 @@ FROM
   \"KEY_CONSTRAINTS\""
 );
 
+CREATE VIEW `TABLE_STATS_VIEW` AS
+SELECT
+  `TBL_ID`,
+  max(CASE `PARAM_KEY` WHEN 'COLUMN_STATS_ACCURATE' THEN `PARAM_VALUE` END) AS COLUMN_STATS_ACCURATE,
+  max(CASE `PARAM_KEY` WHEN 'numFiles' THEN `PARAM_VALUE` END) AS NUM_FILES,
+  max(CASE `PARAM_KEY` WHEN 'numRows' THEN `PARAM_VALUE` END) AS NUM_ROWS,
+  max(CASE `PARAM_KEY` WHEN 'rawDataSize' THEN `PARAM_VALUE` END) AS RAW_DATA_SIZE,
+  max(CASE `PARAM_KEY` WHEN 'totalSize' THEN `PARAM_VALUE` END) AS TOTAL_SIZE,
+  max(CASE `PARAM_KEY` WHEN 'transient_lastDdlTime' THEN `PARAM_VALUE` END) AS TRANSIENT_LAST_DDL_TIME
+FROM `TABLE_PARAMS` GROUP BY `TBL_ID`;
+
+CREATE VIEW `PARTITION_STATS_VIEW` AS
+SELECT
+  `PART_ID`,
+  max(CASE `PARAM_KEY` WHEN 'COLUMN_STATS_ACCURATE' THEN `PARAM_VALUE` END) AS COLUMN_STATS_ACCURATE,
+  max(CASE `PARAM_KEY` WHEN 'numFiles' THEN `PARAM_VALUE` END) AS NUM_FILES,
+  max(CASE `PARAM_KEY` WHEN 'numRows' THEN `PARAM_VALUE` END) AS NUM_ROWS,
+  max(CASE `PARAM_KEY` WHEN 'rawDataSize' THEN `PARAM_VALUE` END) AS RAW_DATA_SIZE,
+  max(CASE `PARAM_KEY` WHEN 'totalSize' THEN `PARAM_VALUE` END) AS TOTAL_SIZE,
+  max(CASE `PARAM_KEY` WHEN 'transient_lastDdlTime' THEN `PARAM_VALUE` END) AS TRANSIENT_LAST_DDL_TIME
+FROM `PARTITION_PARAMS` GROUP BY `PART_ID`;
+
 CREATE DATABASE INFORMATION_SCHEMA;
 
 USE INFORMATION_SCHEMA;

http://git-wip-us.apache.org/repos/asf/hive/blob/055f6a0d/ql/src/test/queries/clientpositive/sysdb.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/sysdb.q b/ql/src/test/queries/clientpositive/sysdb.q
index 9c9d6be..36d80e2 100644
--- a/ql/src/test/queries/clientpositive/sysdb.q
+++ b/ql/src/test/queries/clientpositive/sysdb.q
@@ -102,6 +102,16 @@ select func_name, func_type from funcs order by func_name, func_type
limit 5;
 
 select constraint_name from key_constraints order by constraint_name limit 5;
 
+select COLUMN_STATS_ACCURATE, NUM_FILES, NUM_ROWS, RAW_DATA_SIZE, TOTAL_SIZE FROM TABLE_STATS_VIEW
where COLUMN_STATS_ACCURATE is not null order by NUM_FILES, NUM_ROWS, RAW_DATA_SIZE limit
5;
+
+select COLUMN_STATS_ACCURATE, NUM_FILES, NUM_ROWS, RAW_DATA_SIZE, TOTAL_SIZE FROM PARTITION_STATS_VIEW
where COLUMN_STATS_ACCURATE is not null order by NUM_FILES, NUM_ROWS, RAW_DATA_SIZE limit
5;
+
+describe sys.tab_col_stats;
+
+explain select max(num_distincts) from sys.tab_col_stats;
+
+select max(num_distincts) from sys.tab_col_stats;
+
 use INFORMATION_SCHEMA;
 
 select count(*) from SCHEMATA;
@@ -115,9 +125,3 @@ select * from COLUMNS where TABLE_NAME = 'alltypesorc' or TABLE_NAME =
'moretype
 select * from COLUMN_PRIVILEGES order by GRANTOR, GRANTEE, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME
limit 10;
 
 select TABLE_SCHEMA, TABLE_NAME from views order by TABLE_SCHEMA, TABLE_NAME;
-
-describe sys.tab_col_stats;
-
-explain select max(num_distincts) from sys.tab_col_stats;
-
-select max(num_distincts) from sys.tab_col_stats;

http://git-wip-us.apache.org/repos/asf/hive/blob/055f6a0d/ql/src/test/results/clientpositive/llap/sysdb.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/sysdb.q.out b/ql/src/test/results/clientpositive/llap/sysdb.q.out
index f360c65..7eba2d8 100644
--- a/ql/src/test/results/clientpositive/llap/sysdb.q.out
+++ b/ql/src/test/results/clientpositive/llap/sysdb.q.out
@@ -2113,6 +2113,76 @@ FROM
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: SYS@KEY_CONSTRAINTS
 POSTHOOK: Output: database:sys
+PREHOOK: query: CREATE VIEW `TABLE_STATS_VIEW` AS
+SELECT
+  `TBL_ID`,
+  max(CASE `PARAM_KEY` WHEN 'COLUMN_STATS_ACCURATE' THEN `PARAM_VALUE` END) AS COLUMN_STATS_ACCURATE,
+  max(CASE `PARAM_KEY` WHEN 'numFiles' THEN `PARAM_VALUE` END) AS NUM_FILES,
+  max(CASE `PARAM_KEY` WHEN 'numRows' THEN `PARAM_VALUE` END) AS NUM_ROWS,
+  max(CASE `PARAM_KEY` WHEN 'rawDataSize' THEN `PARAM_VALUE` END) AS RAW_DATA_SIZE,
+  max(CASE `PARAM_KEY` WHEN 'totalSize' THEN `PARAM_VALUE` END) AS TOTAL_SIZE,
+#### A masked pattern was here ####
+FROM `TABLE_PARAMS` GROUP BY `TBL_ID`
+PREHOOK: type: CREATEVIEW
+PREHOOK: Input: sys@table_params
+PREHOOK: Output: SYS@TABLE_STATS_VIEW
+PREHOOK: Output: database:sys
+POSTHOOK: query: CREATE VIEW `TABLE_STATS_VIEW` AS
+SELECT
+  `TBL_ID`,
+  max(CASE `PARAM_KEY` WHEN 'COLUMN_STATS_ACCURATE' THEN `PARAM_VALUE` END) AS COLUMN_STATS_ACCURATE,
+  max(CASE `PARAM_KEY` WHEN 'numFiles' THEN `PARAM_VALUE` END) AS NUM_FILES,
+  max(CASE `PARAM_KEY` WHEN 'numRows' THEN `PARAM_VALUE` END) AS NUM_ROWS,
+  max(CASE `PARAM_KEY` WHEN 'rawDataSize' THEN `PARAM_VALUE` END) AS RAW_DATA_SIZE,
+  max(CASE `PARAM_KEY` WHEN 'totalSize' THEN `PARAM_VALUE` END) AS TOTAL_SIZE,
+#### A masked pattern was here ####
+FROM `TABLE_PARAMS` GROUP BY `TBL_ID`
+POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: sys@table_params
+POSTHOOK: Output: SYS@TABLE_STATS_VIEW
+POSTHOOK: Output: database:sys
+POSTHOOK: Lineage: TABLE_STATS_VIEW.column_stats_accurate EXPRESSION [(table_params)table_params.FieldSchema(name:param_key,
type:string, comment:from deserializer), (table_params)table_params.FieldSchema(name:param_value,
type:string, comment:from deserializer), ]
+POSTHOOK: Lineage: TABLE_STATS_VIEW.num_files EXPRESSION [(table_params)table_params.FieldSchema(name:param_key,
type:string, comment:from deserializer), (table_params)table_params.FieldSchema(name:param_value,
type:string, comment:from deserializer), ]
+POSTHOOK: Lineage: TABLE_STATS_VIEW.num_rows EXPRESSION [(table_params)table_params.FieldSchema(name:param_key,
type:string, comment:from deserializer), (table_params)table_params.FieldSchema(name:param_value,
type:string, comment:from deserializer), ]
+POSTHOOK: Lineage: TABLE_STATS_VIEW.raw_data_size EXPRESSION [(table_params)table_params.FieldSchema(name:param_key,
type:string, comment:from deserializer), (table_params)table_params.FieldSchema(name:param_value,
type:string, comment:from deserializer), ]
+POSTHOOK: Lineage: TABLE_STATS_VIEW.tbl_id SIMPLE [(table_params)table_params.FieldSchema(name:tbl_id,
type:bigint, comment:from deserializer), ]
+POSTHOOK: Lineage: TABLE_STATS_VIEW.total_size EXPRESSION [(table_params)table_params.FieldSchema(name:param_key,
type:string, comment:from deserializer), (table_params)table_params.FieldSchema(name:param_value,
type:string, comment:from deserializer), ]
+POSTHOOK: Lineage: TABLE_STATS_VIEW.transient_last_ddl_time EXPRESSION [(table_params)table_params.FieldSchema(name:param_key,
type:string, comment:from deserializer), (table_params)table_params.FieldSchema(name:param_value,
type:string, comment:from deserializer), ]
+PREHOOK: query: CREATE VIEW `PARTITION_STATS_VIEW` AS
+SELECT
+  `PART_ID`,
+  max(CASE `PARAM_KEY` WHEN 'COLUMN_STATS_ACCURATE' THEN `PARAM_VALUE` END) AS COLUMN_STATS_ACCURATE,
+  max(CASE `PARAM_KEY` WHEN 'numFiles' THEN `PARAM_VALUE` END) AS NUM_FILES,
+  max(CASE `PARAM_KEY` WHEN 'numRows' THEN `PARAM_VALUE` END) AS NUM_ROWS,
+  max(CASE `PARAM_KEY` WHEN 'rawDataSize' THEN `PARAM_VALUE` END) AS RAW_DATA_SIZE,
+  max(CASE `PARAM_KEY` WHEN 'totalSize' THEN `PARAM_VALUE` END) AS TOTAL_SIZE,
+#### A masked pattern was here ####
+FROM `PARTITION_PARAMS` GROUP BY `PART_ID`
+PREHOOK: type: CREATEVIEW
+PREHOOK: Input: sys@partition_params
+PREHOOK: Output: SYS@PARTITION_STATS_VIEW
+PREHOOK: Output: database:sys
+POSTHOOK: query: CREATE VIEW `PARTITION_STATS_VIEW` AS
+SELECT
+  `PART_ID`,
+  max(CASE `PARAM_KEY` WHEN 'COLUMN_STATS_ACCURATE' THEN `PARAM_VALUE` END) AS COLUMN_STATS_ACCURATE,
+  max(CASE `PARAM_KEY` WHEN 'numFiles' THEN `PARAM_VALUE` END) AS NUM_FILES,
+  max(CASE `PARAM_KEY` WHEN 'numRows' THEN `PARAM_VALUE` END) AS NUM_ROWS,
+  max(CASE `PARAM_KEY` WHEN 'rawDataSize' THEN `PARAM_VALUE` END) AS RAW_DATA_SIZE,
+  max(CASE `PARAM_KEY` WHEN 'totalSize' THEN `PARAM_VALUE` END) AS TOTAL_SIZE,
+#### A masked pattern was here ####
+FROM `PARTITION_PARAMS` GROUP BY `PART_ID`
+POSTHOOK: type: CREATEVIEW
+POSTHOOK: Input: sys@partition_params
+POSTHOOK: Output: SYS@PARTITION_STATS_VIEW
+POSTHOOK: Output: database:sys
+POSTHOOK: Lineage: PARTITION_STATS_VIEW.column_stats_accurate EXPRESSION [(partition_params)partition_params.FieldSchema(name:param_key,
type:string, comment:from deserializer), (partition_params)partition_params.FieldSchema(name:param_value,
type:string, comment:from deserializer), ]
+POSTHOOK: Lineage: PARTITION_STATS_VIEW.num_files EXPRESSION [(partition_params)partition_params.FieldSchema(name:param_key,
type:string, comment:from deserializer), (partition_params)partition_params.FieldSchema(name:param_value,
type:string, comment:from deserializer), ]
+POSTHOOK: Lineage: PARTITION_STATS_VIEW.num_rows EXPRESSION [(partition_params)partition_params.FieldSchema(name:param_key,
type:string, comment:from deserializer), (partition_params)partition_params.FieldSchema(name:param_value,
type:string, comment:from deserializer), ]
+POSTHOOK: Lineage: PARTITION_STATS_VIEW.part_id SIMPLE [(partition_params)partition_params.FieldSchema(name:part_id,
type:bigint, comment:from deserializer), ]
+POSTHOOK: Lineage: PARTITION_STATS_VIEW.raw_data_size EXPRESSION [(partition_params)partition_params.FieldSchema(name:param_key,
type:string, comment:from deserializer), (partition_params)partition_params.FieldSchema(name:param_value,
type:string, comment:from deserializer), ]
+POSTHOOK: Lineage: PARTITION_STATS_VIEW.total_size EXPRESSION [(partition_params)partition_params.FieldSchema(name:param_key,
type:string, comment:from deserializer), (partition_params)partition_params.FieldSchema(name:param_value,
type:string, comment:from deserializer), ]
+POSTHOOK: Lineage: PARTITION_STATS_VIEW.transient_last_ddl_time EXPRESSION [(partition_params)partition_params.FieldSchema(name:param_key,
type:string, comment:from deserializer), (partition_params)partition_params.FieldSchema(name:param_value,
type:string, comment:from deserializer), ]
 PREHOOK: query: CREATE DATABASE INFORMATION_SCHEMA
 PREHOOK: type: CREATEDATABASE
 PREHOOK: Output: database:INFORMATION_SCHEMA
@@ -2889,7 +2959,7 @@ POSTHOOK: query: select count(*) from cds
 POSTHOOK: type: QUERY
 POSTHOOK: Input: sys@cds
 #### A masked pattern was here ####
-63
+65
 PREHOOK: query: select column_name, type_name, integer_idx from columns_v2 order by column_name,
integer_idx limit 5
 PREHOOK: type: QUERY
 PREHOOK: Input: sys@columns_v2
@@ -3043,7 +3113,7 @@ POSTHOOK: query: select count(*) from sds
 POSTHOOK: type: QUERY
 POSTHOOK: Input: sys@sds
 #### A masked pattern was here ####
-69
+71
 PREHOOK: query: select param_key, param_value from sd_params order by param_key, param_value
limit 5
 PREHOOK: type: QUERY
 PREHOOK: Input: sys@sd_params
@@ -3258,6 +3328,128 @@ sys_pk_bucketing_cols
 sys_pk_cds
 sys_pk_col_value_loc_map
 sys_pk_col_value_loc_map
+PREHOOK: query: select COLUMN_STATS_ACCURATE, NUM_FILES, NUM_ROWS, RAW_DATA_SIZE, TOTAL_SIZE
FROM TABLE_STATS_VIEW where COLUMN_STATS_ACCURATE is not null order by NUM_FILES, NUM_ROWS,
RAW_DATA_SIZE limit 5
+PREHOOK: type: QUERY
+PREHOOK: Input: sys@table_params
+PREHOOK: Input: sys@table_stats_view
+#### A masked pattern was here ####
+POSTHOOK: query: select COLUMN_STATS_ACCURATE, NUM_FILES, NUM_ROWS, RAW_DATA_SIZE, TOTAL_SIZE
FROM TABLE_STATS_VIEW where COLUMN_STATS_ACCURATE is not null order by NUM_FILES, NUM_ROWS,
RAW_DATA_SIZE limit 5
+POSTHOOK: type: QUERY
+POSTHOOK: Input: sys@table_params
+POSTHOOK: Input: sys@table_stats_view
+#### A masked pattern was here ####
+{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}	0	0	0	0
+{"BASIC_STATS":"true","COLUMN_STATS":{"column_name":"true","create_time":"true","grant_option":"true","grantor":"true","grantor_type":"true","principal_name":"true","principal_type":"true","tbl_col_priv":"true","tbl_column_grant_id":"true","tbl_id":"true"}}
0	0	0	0
+{"BASIC_STATS":"true","COLUMN_STATS":{"next_val":"true","sequence_name":"true"}}	0	0	0	0
+{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}	0	0	0	0
+#### A masked pattern was here ####
+PREHOOK: query: select COLUMN_STATS_ACCURATE, NUM_FILES, NUM_ROWS, RAW_DATA_SIZE, TOTAL_SIZE
FROM PARTITION_STATS_VIEW where COLUMN_STATS_ACCURATE is not null order by NUM_FILES, NUM_ROWS,
RAW_DATA_SIZE limit 5
+PREHOOK: type: QUERY
+PREHOOK: Input: sys@partition_params
+PREHOOK: Input: sys@partition_stats_view
+#### A masked pattern was here ####
+POSTHOOK: query: select COLUMN_STATS_ACCURATE, NUM_FILES, NUM_ROWS, RAW_DATA_SIZE, TOTAL_SIZE
FROM PARTITION_STATS_VIEW where COLUMN_STATS_ACCURATE is not null order by NUM_FILES, NUM_ROWS,
RAW_DATA_SIZE limit 5
+POSTHOOK: type: QUERY
+POSTHOOK: Input: sys@partition_params
+POSTHOOK: Input: sys@partition_stats_view
+#### A masked pattern was here ####
+{"BASIC_STATS":"true","COLUMN_STATS":{"c_boolean":"true","c_float":"true","c_int":"true","key":"true","value":"true"}}
1	20	262	282
+{"BASIC_STATS":"true","COLUMN_STATS":{"c_boolean":"true","c_float":"true","c_int":"true","key":"true","value":"true"}}
1	20	262	282
+{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}	1	500	5312	5812
+{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}	1	500	5312	5812
+{"BASIC_STATS":"true","COLUMN_STATS":{"key":"true","value":"true"}}	1	500	5312	5812
+PREHOOK: query: describe sys.tab_col_stats
+PREHOOK: type: DESCTABLE
+PREHOOK: Input: sys@tab_col_stats
+POSTHOOK: query: describe sys.tab_col_stats
+POSTHOOK: type: DESCTABLE
+POSTHOOK: Input: sys@tab_col_stats
+cs_id               	bigint              	from deserializer   
+db_name             	string              	from deserializer   
+table_name          	string              	from deserializer   
+column_name         	string              	from deserializer   
+column_type         	string              	from deserializer   
+tbl_id              	bigint              	from deserializer   
+long_low_value      	bigint              	from deserializer   
+long_high_value     	bigint              	from deserializer   
+double_high_value   	double              	from deserializer   
+double_low_value    	double              	from deserializer   
+big_decimal_low_value	string              	from deserializer   
+big_decimal_high_value	string              	from deserializer   
+num_nulls           	bigint              	from deserializer   
+num_distincts       	bigint              	from deserializer   
+avg_col_len         	double              	from deserializer   
+max_col_len         	bigint              	from deserializer   
+num_trues           	bigint              	from deserializer   
+num_falses          	bigint              	from deserializer   
+last_analyzed       	bigint              	from deserializer   
+PREHOOK: query: explain select max(num_distincts) from sys.tab_col_stats
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select max(num_distincts) from sys.tab_col_stats
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Tez
+#### A masked pattern was here ####
+      Edges:
+        Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE)
+#### A masked pattern was here ####
+      Vertices:
+        Map 1 
+            Map Operator Tree:
+                TableScan
+                  alias: tab_col_stats
+                  Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats:
NONE
+                  Select Operator
+                    expressions: num_distincts (type: bigint)
+                    outputColumnNames: num_distincts
+                    Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats:
NONE
+                    Group By Operator
+                      aggregations: max(num_distincts)
+                      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)
+            Execution mode: llap
+            LLAP IO: no inputs
+        Reducer 2 
+            Execution mode: llap
+            Reduce Operator Tree:
+              Group By Operator
+                aggregations: max(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.SequenceFileInputFormat
+                      output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: select max(num_distincts) from sys.tab_col_stats
+PREHOOK: type: QUERY
+PREHOOK: Input: sys@tab_col_stats
+#### A masked pattern was here ####
+POSTHOOK: query: select max(num_distincts) from sys.tab_col_stats
+POSTHOOK: type: QUERY
+POSTHOOK: Input: sys@tab_col_stats
+#### A masked pattern was here ####
+7488
 PREHOOK: query: use INFORMATION_SCHEMA
 PREHOOK: type: SWITCHDATABASE
 PREHOOK: Input: database:information_schema
@@ -3330,6 +3522,7 @@ default	sys	part_privs	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
 default	sys	partition_key_vals	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
 default	sys	partition_keys	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
 default	sys	partition_params	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
+default	sys	partition_stats_view	VIEW	NULL	NULL	NULL	NULL	NULL	NO	NO	NULL
 default	sys	partitions	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
 default	sys	role_map	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
 default	sys	roles	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
@@ -3346,6 +3539,7 @@ default	sys	skewed_values	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO
NULL
 default	sys	sort_cols	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
 default	sys	tab_col_stats	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
 default	sys	table_params	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
+default	sys	table_stats_view	VIEW	NULL	NULL	NULL	NULL	NULL	NO	NO	NULL
 default	sys	tbl_col_privs	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
 default	sys	tbl_privs	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
 default	sys	tbls	BASE_TABLE	NULL	NULL	NULL	NULL	NULL	YES	NO	NULL
@@ -3445,95 +3639,5 @@ information_schema	schemata
 information_schema	table_privileges
 information_schema	tables
 information_schema	views
-PREHOOK: query: describe sys.tab_col_stats
-PREHOOK: type: DESCTABLE
-PREHOOK: Input: sys@tab_col_stats
-POSTHOOK: query: describe sys.tab_col_stats
-POSTHOOK: type: DESCTABLE
-POSTHOOK: Input: sys@tab_col_stats
-cs_id               	bigint              	from deserializer   
-db_name             	string              	from deserializer   
-table_name          	string              	from deserializer   
-column_name         	string              	from deserializer   
-column_type         	string              	from deserializer   
-tbl_id              	bigint              	from deserializer   
-long_low_value      	bigint              	from deserializer   
-long_high_value     	bigint              	from deserializer   
-double_high_value   	double              	from deserializer   
-double_low_value    	double              	from deserializer   
-big_decimal_low_value	string              	from deserializer   
-big_decimal_high_value	string              	from deserializer   
-num_nulls           	bigint              	from deserializer   
-num_distincts       	bigint              	from deserializer   
-avg_col_len         	double              	from deserializer   
-max_col_len         	bigint              	from deserializer   
-num_trues           	bigint              	from deserializer   
-num_falses          	bigint              	from deserializer   
-last_analyzed       	bigint              	from deserializer   
-PREHOOK: query: explain select max(num_distincts) from sys.tab_col_stats
-PREHOOK: type: QUERY
-POSTHOOK: query: explain select max(num_distincts) from sys.tab_col_stats
-POSTHOOK: type: QUERY
-STAGE DEPENDENCIES:
-  Stage-1 is a root stage
-  Stage-0 depends on stages: Stage-1
-
-STAGE PLANS:
-  Stage: Stage-1
-    Tez
-#### A masked pattern was here ####
-      Edges:
-        Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE)
-#### A masked pattern was here ####
-      Vertices:
-        Map 1 
-            Map Operator Tree:
-                TableScan
-                  alias: tab_col_stats
-                  Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats:
NONE
-                  Select Operator
-                    expressions: num_distincts (type: bigint)
-                    outputColumnNames: num_distincts
-                    Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats:
NONE
-                    Group By Operator
-                      aggregations: max(num_distincts)
-                      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)
-            Execution mode: llap
-            LLAP IO: no inputs
-        Reducer 2 
-            Execution mode: llap
-            Reduce Operator Tree:
-              Group By Operator
-                aggregations: max(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.SequenceFileInputFormat
-                      output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
-  Stage: Stage-0
-    Fetch Operator
-      limit: -1
-      Processor Tree:
-        ListSink
-
-PREHOOK: query: select max(num_distincts) from sys.tab_col_stats
-PREHOOK: type: QUERY
-PREHOOK: Input: sys@tab_col_stats
-#### A masked pattern was here ####
-POSTHOOK: query: select max(num_distincts) from sys.tab_col_stats
-POSTHOOK: type: QUERY
-POSTHOOK: Input: sys@tab_col_stats
-#### A masked pattern was here ####
-7488
+sys	partition_stats_view
+sys	table_stats_view


Mime
View raw message