You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2025/04/28 16:17:22 UTC
[I] Internal error with `generate_series`: Internal error: could not cast array of type Date32 [datafusion]
alamb opened a new issue, #15881:
URL: https://github.com/apache/datafusion/issues/15881
### Describe the bug
When invalid arguments are passed to `generate_series` it generates internal errors rather than normal execution errorrs
Also the errors are not clear how to fix the issue
### To Reproduce
```
> select generate_series(1, '2024-01-01', '2025-01-02');
Internal error: could not cast array of type Date32 to arrow_array::array::primitive_array::PrimitiveArray<arrow_array::types::Int64Type>.
This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker
```
Here is a similar one:
```
> select unnest(generate_series('2024-01-01'::timestamp, '2025-01-02', interval '1 day'));
Internal error: Unexpected argument type for GENERATE_SERIES : Date32.
```
### Expected behavior
I think this should just be a normal error (not an internal error)
According to the docs, https://datafusion.apache.org/user-guide/sql/scalar_functions.html#generate-series the first and second argument must be the same
> Arguments
> start: Start of the series. Ints, timestamps, dates or string types that can be coerced to Date32 are supported.
> end: End of the series (included). Type must be the same as start.
> step: Increase by step (can not be 0). Steps less than a day are supported only for timestamp ranges.
### 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: github-unsubscribe@datafusion.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] Internal error with `generate_series`: Internal error: could not cast array of type Date32 [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #15881: Internal error with `generate_series`: Internal error: could not cast array of type Date32
URL: https://github.com/apache/datafusion/issues/15881
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] Internal error with `generate_series`: Internal error: could not cast array of type Date32 [datafusion]
Posted by "jonathanc-n (via GitHub)" <gi...@apache.org>.
jonathanc-n commented on issue #15881:
URL: https://github.com/apache/datafusion/issues/15881#issuecomment-2836320171
take
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org