【发布时间】:2015-02-04 02:20:19
【问题描述】:
我在我的环境中使用 hive-0.10.0-cdh-4.7.0。
我有一个名为 test store 的表作为序列文件和一些按 date_dim 划分的分区,如下所示:
game=Test/date_dim=2014-07-01
game=Test/date_dim=2014-07-11
game=Test/date_dim=2014-07-21
game=Test/date_dim=2014-07-31
我想在 SQL 命令中删除 2014-07-21 和 2014-07-30 之间的分区:
alter table test drop partition (date_dim>='2014-07-11',date_dim<='2014-07-30')
我希望这两个分区被删除:
game=Test/date_dim=2014-07-11
game=Test/date_dim=2014-07-21
但实际上,这3个分区被删除了:
game=Test/date_dim=2014-07-01
game=Test/date_dim=2014-07-11
game=Test/date_dim=2014-07-21
似乎 hive drop 分区只使用date_dim<='2014-07-30' 条件。
有没有按照我的意愿制作 hive drop 分区?
【问题讨论】:
标签: hive