blob: 09ea3f216550b58e6ffba6b64d36eb5df3f10af0 [file] [log] [blame]
====
---- HIVE_QUERY
use $DATABASE;
create table insertonly_nopart_colstats (x int) tblproperties (
'transactional'='true',
'transactional_properties'='insert_only');
insert into insertonly_nopart_colstats values (1);
analyze table insertonly_nopart_colstats compute statistics for columns;
create table insertonly_nopart_colstatschg (x int) tblproperties (
'transactional'='true',
'transactional_properties'='insert_only');
insert into insertonly_nopart_colstatschg values (1);
analyze table insertonly_nopart_colstatschg compute statistics for columns;
create table insertonly_part_colstats (x int) partitioned by (ds string) tblproperties (
'transactional'='true',
'transactional_properties'='insert_only');
alter table insertonly_part_colstats add partition (ds='2010-01-01');
alter table insertonly_part_colstats add partition (ds='2010-01-02');
insert into insertonly_part_colstats partition (ds='2010-01-01') values (1);
analyze table insertonly_part_colstats partition(ds='2010-01-01')
compute statistics for columns;
====
---- QUERY
invalidate metadata insertonly_nopart_colstats;
show create table insertonly_nopart_colstats;
---- RESULTS
row_regex: .*COLUMN_STATS_ACCURATE.*
====
---- QUERY
invalidate metadata insertonly_nopart_colstatschg;
insert into insertonly_nopart_colstatschg values (2);
show create table insertonly_nopart_colstatschg;
---- RESULTS
row_regex: (?!.*COLUMN_STATS_ACCURATE)
====
---- QUERY
select x from insertonly_nopart_colstatschg;
---- RESULTS
1
2
====
---- QUERY
invalidate metadata insertonly_part_colstats;
insert into insertonly_part_colstats partition (ds='2010-01-01') values (2);
select x from insertonly_part_colstats where ds='2010-01-01';
---- RESULTS
1
2
---- TYPES
int
====