alamb commented on code in PR #7844:
URL: https://github.com/apache/arrow-datafusion/pull/7844#discussion_r1365284753


##########
datafusion/expr/src/built_in_function.rs:
##########
@@ -745,9 +748,10 @@ impl BuiltinScalarFunction {
                     return plan_err!("The to_hex function can only accept 
integers.");
                 }
             }),
-            BuiltinScalarFunction::ToTimestamp => Ok(Timestamp(Nanosecond, 
None)),
+            BuiltinScalarFunction::ToTimestamp => Ok(Timestamp(Second, None)),

Review Comment:
   while writing up https://github.com/apache/arrow-datafusion/issues/7868 it 
occured to me this signature prevents implementing something like 
`to_timestamp(1.234)` reasonably, as it can't represent sub-second precison
   
   What would you think about leaving the return type the same 
(`Timestamp(Nanosecond, None)`) so that we can add support for floating point 
argments as a follow on?



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

Reply via email to