2010YOUY01 opened a new issue, #17472:
URL: https://github.com/apache/datafusion/issues/17472

   ### Describe the bug
   
   datafusion-cli is compiled from the latest main commit 
https://github.com/apache/datafusion/commit/d19bf524e384bc24e509c70f1806b6f330829529
   
   ```
   > select to_local_time(null);
   Error during planning: Execution error: Function 'to_local_time' 
user-defined coercion failed with "Error during planning: The to_local_time 
function can only accept Timestamp as the arg got Null" No function matches the 
given name and argument types 'to_local_time(Null)'. You might need to add 
explicit type casts.
           Candidate functions:
           to_local_time(UserDefined)
   ```
   
   `null` literal can be interpreted as a missing value of `Timestamp` type, I 
think it would be more reasonable to return NULL instead of planning error.
   
   ### To Reproduce
   
   _No response_
   
   ### Expected behavior
   
   _No response_
   
   ### Additional context
   
   Found by SQLancer https://github.com/apache/datafusion/issues/11030


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