You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "erenavsarogullari (via GitHub)" <gi...@apache.org> on 2026/02/21 22:12:33 UTC
[I] Fix Spark `slice` function `Null` type to `GenericListArray` casting issue [datafusion]
erenavsarogullari opened a new issue, #20466:
URL: https://github.com/apache/datafusion/issues/20466
### Describe the bug
Currently, Spark `slice` function accepts Null Arrays and return `Null` for this particular queries. DataFusion-Spark `slice` function also needs to return `NULL` when Null Array is set.
**Spark Behavior** (tested with latest Spark master):
```
> SELECT slice(NULL, 1, 2);
+-----------------+
|slice(NULL, 1, 2)|
+-----------------+
| null|
+-----------------+
```
**DF Behaviour:**
Current:
```
query error
SELECT slice(NULL, 1, 2);
----
DataFusion error: Internal error: could not cast array of type Null to arrow_array::array::list_array::GenericListArray<i32>.
This issue was likely caused by a bug in DataFusion's code. Please help us to resolve this by filing a bug report in our issue tracker: https://github.com/apache/datafusion/issues
```
New:
```
query ?
SELECT slice(NULL, 1, 2);
----
NULL
```
### To Reproduce
Explained under description section.
### Expected behavior
Explained under description section.
### 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] Fix Spark `slice` function `Null` type to `GenericListArray` casting issue [datafusion]
Posted by "erenavsarogullari (via GitHub)" <gi...@apache.org>.
erenavsarogullari commented on issue #20466:
URL: https://github.com/apache/datafusion/issues/20466#issuecomment-3939591065
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
Re: [I] Fix Spark `slice` function `Null` type to `GenericListArray` casting issue [datafusion]
Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey closed issue #20466: Fix Spark `slice` function `Null` type to `GenericListArray` casting issue
URL: https://github.com/apache/datafusion/issues/20466
--
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