jayzhan211 commented on PR #8886:
URL: https://github.com/apache/datafusion/pull/8886#issuecomment-2467332555

   @Omega359 Do you know why `to_timestamp` has more than 2 arguments? What 
behaviour does this function follow?
   
   In Postgres, there are two arguments
   ```
   to_timestamp ( text, text ) → timestamp with time zone
   
   Converts string to time stamp according to the given format. (See also 
to_timestamp(double precision) in [Table 
9.33](https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-TABLE).)
   
   to_timestamp('05 Dec 2000', 'DD Mon YYYY') → 2000-12-05 00:00:00-05
   ```
   ```
   to_timestamp ( double precision ) → timestamp with time zone
   
   Convert Unix epoch (seconds since 1970-01-01 00:00:00+00) to timestamp with 
time zone
   
   to_timestamp(1284352323) → 2010-09-13 04:32:03+00
   ```
   
   
   Can I change the signature to be consistent with Postgres one?
   
   
https://github.com/apache/datafusion/blob/7ebd993fe47e78006bad33256160716f73b13cef/datafusion/sqllogictest/test_files/timestamps.slt#L362-L366


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

Reply via email to