mirror of
https://github.com/apache/impala.git
synced 2026-02-01 12:00:22 -05:00
Adds erasure coding policy to introspection commands SHOW FILES, SHOW PARTITIONS, SHOW TABLE STATS, and DESCRIBE EXTENDED. Remove `throws IOException` for methods that don't throw. Removes null check for getSd because getStorageDescriptorInfo - which is called right after getTableMetaDataInformation - uses it without checking for null. Adds '$ERASURECODE_POLICY' for runtime test substitution. The test suite replaces this with the current erasure code policy - from HDFS_ERASURECODE_POLICY - or NONE to match expected output. Testing: - ran backend, end-to-end, and custom cluster tests with erasure coding - ran backend, end-to-end, and custom cluster tests with exhaustive strategy Change-Id: Idd95f2d18b3980581788c92993b6d2f53504b5e0 Reviewed-on: http://gerrit.cloudera.org:8080/19268 Reviewed-by: Michael Smith <michael.smith@cloudera.com> Tested-by: Michael Smith <michael.smith@cloudera.com>
84 lines
2.9 KiB
Plaintext
84 lines
2.9 KiB
Plaintext
====
|
|
---- QUERY
|
|
# test compute stats on a partitioned date text table
|
|
create table date_tbl_copy like functional.date_tbl;
|
|
insert into date_tbl_copy partition(date_part)
|
|
select * from functional.date_tbl;
|
|
alter table date_tbl_copy add column d DATE;
|
|
====
|
|
---- QUERY
|
|
compute stats date_tbl_copy;
|
|
---- RESULTS
|
|
'Updated 4 partition(s) and 3 column(s).'
|
|
====
|
|
---- QUERY
|
|
show table stats date_tbl_copy;
|
|
---- LABELS
|
|
date_part, #Rows, #Files, Size, Bytes Cached, Cache Replication, Format, Incremental Stats, Location, EC Policy
|
|
---- RESULTS
|
|
'0001-01-01',7,1,'83B','NOT CACHED','NOT CACHED','TEXT','false',regex:.*,'$ERASURECODE_POLICY'
|
|
'1399-06-27',3,1,'34B','NOT CACHED','NOT CACHED','TEXT','false',regex:.*,'$ERASURECODE_POLICY'
|
|
'2017-11-27',10,1,'140B','NOT CACHED','NOT CACHED','TEXT','false',regex:.*,'$ERASURECODE_POLICY'
|
|
'9999-12-31',2,1,'28B','NOT CACHED','NOT CACHED','TEXT','false',regex:.*,'$ERASURECODE_POLICY'
|
|
'Total',22,4,'285B','0B','','','','',''
|
|
---- TYPES
|
|
STRING, BIGINT, BIGINT, STRING, STRING, STRING, STRING, STRING, STRING, STRING
|
|
====
|
|
---- QUERY
|
|
show column stats date_tbl_copy;
|
|
---- LABELS
|
|
COLUMN, TYPE, #DISTINCT VALUES, #NULLS, MAX SIZE, AVG SIZE, #TRUES, #FALSES
|
|
---- RESULTS
|
|
'd','DATE',0,22,4,4,-1,-1
|
|
'date_part','DATE',4,0,4,4,-1,-1
|
|
'date_col','DATE',16,2,4,4,-1,-1
|
|
'id_col','INT',22,0,4,4,-1,-1
|
|
---- TYPES
|
|
STRING, STRING, BIGINT, BIGINT, BIGINT, DOUBLE, BIGINT, BIGINT
|
|
====
|
|
---- QUERY
|
|
# Removing a column shouldn't cause the stats to be dropped.
|
|
alter table date_tbl_copy drop column date_col;
|
|
---- RESULTS
|
|
'Column has been dropped.'
|
|
====
|
|
---- QUERY
|
|
show column stats date_tbl_copy;
|
|
---- LABELS
|
|
COLUMN, TYPE, #DISTINCT VALUES, #NULLS, MAX SIZE, AVG SIZE, #TRUES, #FALSES
|
|
---- RESULTS
|
|
'd','DATE',0,22,4,4,-1,-1
|
|
'id_col','INT',22,0,4,4,-1,-1
|
|
'date_part','DATE',4,0,4,4,-1,-1
|
|
---- TYPES
|
|
STRING, STRING, BIGINT, BIGINT, BIGINT, DOUBLE, BIGINT, BIGINT
|
|
====
|
|
---- QUERY
|
|
# drop stats from this table
|
|
drop stats date_tbl_copy;
|
|
====
|
|
---- QUERY
|
|
show table stats date_tbl_copy;
|
|
---- LABELS
|
|
date_part, #Rows, #Files, Size, Bytes Cached, Cache Replication, Format, Incremental Stats, Location, EC POLICY
|
|
---- RESULTS
|
|
'0001-01-01',-1,1,'83B','NOT CACHED','NOT CACHED','TEXT','false',regex:.*,'$ERASURECODE_POLICY'
|
|
'1399-06-27',-1,1,'34B','NOT CACHED','NOT CACHED','TEXT','false',regex:.*,'$ERASURECODE_POLICY'
|
|
'2017-11-27',-1,1,'140B','NOT CACHED','NOT CACHED','TEXT','false',regex:.*,'$ERASURECODE_POLICY'
|
|
'9999-12-31',-1,1,'28B','NOT CACHED','NOT CACHED','TEXT','false',regex:.*,'$ERASURECODE_POLICY'
|
|
'Total',-1,4,'285B','0B','','','','',''
|
|
---- TYPES
|
|
STRING, BIGINT, BIGINT, STRING, STRING, STRING, STRING, STRING, STRING, STRING
|
|
====
|
|
---- QUERY
|
|
show column stats date_tbl_copy;
|
|
---- LABELS
|
|
COLUMN, TYPE, #DISTINCT VALUES, #NULLS, MAX SIZE, AVG SIZE, #TRUES, #FALSES
|
|
---- RESULTS
|
|
'd','DATE',-1,-1,4,4,-1,-1
|
|
'id_col','INT',-1,-1,4,4,-1,-1
|
|
'date_part','DATE',4,0,4,4,-1,-1
|
|
---- TYPES
|
|
STRING, STRING, BIGINT, BIGINT, BIGINT, DOUBLE, BIGINT, BIGINT
|
|
====
|