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: [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]

Reply via email to