-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem or challenge?
The newly implemented generate_series UDTF seems to only supports integers. Timestamps don't seem supported:
> select * from generate_series(now() - interval '1 year', now(), interval '1 month');
Error during planning: First argument must be an integer literal
> select * from unnest(generate_series(now() - interval '1 year', now(), interval '1 month'));
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| UNNEST(generate_series(now() - IntervalMonthDayNano("IntervalMonthDayNano { months: 12, days: 0, nanoseconds: 0 }"),now(),IntervalMonthDayNano("IntervalMonthDayNano { months: 1, days: 0, nanoseconds: 0 }"))) |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 2024-01-20T12:53:39.484276Z |
| 2024-02-20T12:53:39.484276Z |
| 2024-03-20T12:53:39.484276Z |
| 2024-04-20T12:53:39.484276Z |
| 2024-05-20T12:53:39.484276Z |
| 2024-06-20T12:53:39.484276Z |
| 2024-07-20T12:53:39.484276Z |
| 2024-08-20T12:53:39.484276Z |
| 2024-09-20T12:53:39.484276Z |
| 2024-10-20T12:53:39.484276Z |
| 2024-11-20T12:53:39.484276Z |
| 2024-12-20T12:53:39.484276Z |
| 2025-01-20T12:53:39.484276Z |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
13 row(s) fetched.
Elapsed 0.035 seconds.It would be nice to have similarly supported types as to the array generate_series variant
Describe the solution you'd like
No response
Describe alternatives you've considered
epoch as input, but not the greatest idea since month steps for examples can differ depending on the month
Additional context
Related PRs:
2010YOUY01 and alamb
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request