hive 分区表增加column导入数据为空

hive1.1.0和hive1.2.1上,直接使用 alter table add column 分区表新增字段后新增字段值为空的情况。
解决如下:

1
2
3
4

ALTER TABLE table ADD COLUMNS (duration bigint COMMENT '时长');

ALTER TABLE table partition(day=20171219) ADD COLUMNS (duration bigint COMMENT '时长');