petern48 commented on code in PR #17491: URL: https://github.com/apache/datafusion/pull/17491#discussion_r2341431611
########## datafusion/functions/src/datetime/to_local_time.rs: ########## @@ -119,6 +119,7 @@ impl ToLocalTimeFunc { let arg_type = time_value.data_type(); match arg_type { + DataType::Null => Ok(ColumnarValue::Scalar(ScalarValue::Null)), Review Comment: > if the function promised to return a value of type DataType::Timestamp(Nanosecond, None) during planning it needs to do so during execution. ScalarValue::Null has type DataType::Null, so it's a different type. Got it, that makes sense. Thanks for clarifying. For some reason, I thought I remembered seeing other functions returning a plain null, but looking back at them, they do return a timestamp None. The new commit makes sense to me. Thanks for investigating that. -- 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-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org