andygrove opened a new issue, #363:
URL: https://github.com/apache/datafusion-spark/issues/363

   ### Describe the bug
   
   `date_part` with a NULL field returns a NULL of type INT. Spark returns a 
NULL of type DOUBLE.
   
   ### To Reproduce
   
   ```sql
   SELECT date_part(NULL::string, '2000-01-01'::date);
   ```
   
   datafusion-spark returns `NULL` of type `Int32`.
   
   In Spark 4.2.0, `typeof(date_part(NULL::string, '2000-01-01'::date))` is 
`double`.
   
   ### Expected behavior
   
   A NULL DOUBLE, as in Spark.
   
   ### Additional context
   
   #77 fixed the error on a NULL field and chose an INT result. The record is 
in `datetime/date_part.slt`.
   


-- 
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