findepi commented on code in PR #17491:
URL: https://github.com/apache/datafusion/pull/17491#discussion_r2335767057


##########
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:
   @alamb what needs to happen for existing tests to catch situations where 
type of data returned from a function doesn't match the promised type?



##########
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:
   Shouldn't this be a scalar value of timestamp type?
   
   ```suggestion
               DataType::Null => 
Ok(ColumnarValue::Scalar(ScalarValue::TimestampNanosecond(None, None))),
   ```



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