You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "ranflarion (via GitHub)" <gi...@apache.org> on 2026/10/07 20:00:12 UTC
[I] Spark `char` fails on a NULL scalar argument [datafusion]
ranflarion opened a new issue, #26125:
URL: https://github.com/apache/datafusion/issues/26125
### Describe the bug
datafusion-spark's `char` fails on a NULL scalar argument with `Execution error: The argument must be an Int64 array or scalar.`, where Spark returns NULL. `spark_chr` (`datafusion/spark/src/function/string/char.rs`) handles `ScalarValue::Int64(Some(_))` and sends `Int64(None)` to that error. NULL rows of an array argument already return NULL.
### To Reproduce
```sql
SELECT char(NULL::INT);
```
### Expected behavior
`NULL`, as Spark returns for `char(NULL)`.
--
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] Spark `char` fails on a NULL scalar argument [datafusion]
Posted by "neilconway (via GitHub)" <gi...@apache.org>.
neilconway closed issue #26125: Spark `char` fails on a NULL scalar argument
URL: https://github.com/apache/datafusion/issues/26125
--
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