jayzhan211 opened a new issue, #12052:
URL: https://github.com/apache/datafusion/issues/12052
### Describe the bug
In #11907, interval that is less than a day is not supported
We could find out a way to support this query
`select generate_series('2021-01-01'::timestamp, '2021-01-02'::timestamp,
INTERVAL '1' HOUR);`
### To Reproduce
Result on `main`
```
query error DataFusion error: Execution error: Cannot generate date range
less than 1 day\.
select generate_series('2021-01-01'::timestamp, '2021-01-02'::timestamp,
INTERVAL '1' HOUR);
tamp, '2021-01-02'::timestamp, INTERVAL '1' HOUR);
```
### Expected behavior
Result from DuckDB
```
D select generate_series('2021-01-01'::timestamp, '2021-01-02'::timestamp,
INTERVAL '1' HOUR);
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ generate_series(CAST('2021-01-01' AS TIMESTAMP), CAST('2021-01-02' AS
TIMESTAMP), to_hours(CAST(trunc(CAST('1' AS DOUBLE)) AS BIGINT))) │
│
timestamp[] │
├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ [2021-01-01 00:00:00, 2021-01-01 01:00:00, 2021-01-01 02:00:00, 2021-01-01
03:00:00, 2021-01-01 04:00:00, 2021-01-01 05:00:00, 2021-01-01… │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
```
### 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]