【发布时间】:2016-11-04 01:31:39
【问题描述】:
当我想从一张大表中选择上个月时,我可以这样做:
select *
from table
where yyyymm=(select max(yyyymm) from table)
这需要永远。但是
hive> show partitions table
只需一秒钟。
是否可以将show partitions table 操作为 text_string 并执行以下操作:
select *
from table
where yyyymm=(manipulated 'partition_txt')
【问题讨论】: