with temp as
(
select DATE_ADD(CURRENT_DATE ,-365) as start_date
)
SELECT
date_add(current_date ,-t.pos)
from temp lateral VIEW posexplode(split(space(DATEDIFF(CURRENT_DATE,start_date)),") ) t as pos,val
where t.pos<=365
HIVE生成一年的连续日期
于 2023-05-26 16:12:12 首次发布