dqkqd commented on issue #16678: URL: https://github.com/apache/datafusion/issues/16678#issuecomment-3417512617
@Jefffrey I have checked. There is no test for `to_timestamp` with vectorized input. However, after looking closely at the #16639 and the test, I found that `to_timestamp(double)` and `cast(double as timestamp)` return different results. ``` datafusion/sqllogictest/test_files/timestamps.slt:504 query PPP SELECT to_timestamp(1.1) as c1, cast(1.1 as timestamp) as c2, 1.1::timestamp as c3; ---- 1970-01-01T00:00:01.100 1970-01-01T00:00:00.000000001 1970-01-01T00:00:00.000000001 ``` From https://github.com/apache/datafusion/pull/16639/files#r2213084931, I think what we want is to have `to_timestamp(double)` return something like this: ``` > SELECT to_timestamp(1.1); +-------------------------------+ | to_timestamp(Float64(1.1)) | +-------------------------------+ | 1970-01-01T00:00:00.000000001 | +-------------------------------+ ``` -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
