Abdullahsab3 opened a new issue, #14209:
URL: https://github.com/apache/datafusion/issues/14209
### 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:
```sql
> 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
Related PRs:
- https://github.com/apache/datafusion/pull/13856/files
- https://github.com/apache/datafusion/pull/13540
### Describe the solution you'd like
_No response_
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]