select *, DATE_ADD(t_start, n) AS pt from ( SELECT 22 as uid ,'2024-10-01'as t_start ,'2024-10-05'as t_end )t LATERAL VIEW posexplode(split(space(DATEDIFF(t_end, t_start)), ' ')) k AS n,
22 | 2024-10-01 | 2024-10-05 | 11 | 0 | 2024-10-01 | |
22 | 2024-10-01 | 2024-10-05 | 11 | 1 | 2024-10-02 | |
22 | 2024-10-01 | 2024-10-05 | 11 | 2 | 2024-10-03 | |
22 | 2024-10-01 | 2024-10-05 | 11 | 3 | 2024-10-04 | |
22 | 2024-10-01 | 2024-10-05 | 11 | 4 | 2024-10-05 |
标签:11,10,01,22,05,hive,生成,2024,连续 From: https://www.cnblogs.com/pengpenghuhu/p/18461569