blob: 8193e6235b16b97fd8fcbf75ecb83cd95df32612 [file] [log] [blame]
--! qt:dataset:src
create table sc as select *
from (select '2011-01-11', '2011-01-11+14:18:26' from src tablesample (1 rows)
union all
select '2011-01-11', '2011-01-11+15:18:26' from src tablesample (1 rows)
union all
select '2011-01-11', '2011-01-11+16:18:26' from src tablesample (1 rows) ) s;
create table sc_part (key string) partitioned by (ts string) stored as rcfile;
set hive.exec.dynamic.partition=true;
insert overwrite table sc_part partition(ts) select * from sc;
show partitions sc_part;
select count(*) from sc_part where ts is not null;
insert overwrite table sc_part partition(ts) select * from sc;
show partitions sc_part;
select count(*) from sc_part where ts is not null;