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


##########
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:
   In PG 
   ```
   select pg_typeof(to_timestamp(1.234))
   ```
   the return type is `timestamp with time zone` which has minimum resolution 
as a microsecond
   
   https://www.postgresql.org/docs/current/datatype-datetime.html
   
   In light of this, having the return type as nanos or micros makes more sense 
for me.
   What do you think is better? microseconds like in PG or nanos like it was in 
DF before the PR?



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