comphead commented on code in PR #7941:
URL: https://github.com/apache/arrow-datafusion/pull/7941#discussion_r1373592550


##########
datafusion/expr/src/built_in_function.rs:
##########
@@ -755,7 +755,10 @@ impl BuiltinScalarFunction {
                     return plan_err!("The to_hex function can only accept 
integers.");
                 }
             }),
-            BuiltinScalarFunction::ToTimestamp => Ok(Timestamp(Nanosecond, 
None)),
+            BuiltinScalarFunction::ToTimestamp => Ok(match 
&input_expr_types[0] {
+                dt if dt.is_integer() => Timestamp(Second, None),

Review Comment:
   Testing integers.
   We cannot return always nanoseconds, in that case we limit the output as 
cannot represent timestamps far in the past or in the future. example 
https://github.com/apache/arrow-datafusion/issues/7802 and also its 
incompatible with PG https://github.com/apache/arrow-datafusion/issues/2979
   



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