jayzhan211 opened a new issue, #13351: URL: https://github.com/apache/datafusion/issues/13351
### Is your feature request related to a problem or challenge? In postgres, `to_timestamp` has signature `to_timestamp ( text, text ) → timestamp with time zone` and `to_timestamp ( double precision ) → timestamp with time zone`. But we have query that has more than 2 arguments https://github.com/apache/datafusion/blob/7ebd993fe47e78006bad33256160716f73b13cef/datafusion/sqllogictest/test_files/timestamps.slt#L362-L366 Other than that the result seems different too. Postgres ``` postgres=# select to_timestamp(1); to_timestamp --------------------------- 1970-01-01 07:30:01+07:30 ``` Duckdb ``` D select to_timestamp(1); ┌───────────────────────────┐ │ to_timestamp(1) │ │ timestamp with time zone │ ├───────────────────────────┤ │ 1970-01-01 07:30:01+07:30 │ └───────────────────────────┘ ``` Datafusion ``` query P select to_timestamp(1); ---- 1970-01-01T00:00:01 ``` ### Describe the solution you'd like Change the function signature to be consistent with Postgres. Change the result to be consistent with Postgres. ### Describe alternatives you've considered _No response_ ### Additional context Duckdb doesn't support (text, text) signature ``` D select to_timestamp('05 Dec 2000', 'DD Mon YYYY'); Binder Error: No function matches the given name and argument types 'to_timestamp(STRING_LITERAL, STRING_LITERAL)'. You might need to add explicit type casts. Candidate functions: to_timestamp(DOUBLE) -> TIMESTAMP WITH TIME ZONE LINE 1: select to_timestamp('05 Dec 2000', 'DD Mon YYY... ``` https://www.postgresql.org/docs/current/functions-formatting.html -- 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.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