devanbenz commented on issue #12218: URL: https://github.com/apache/datafusion/issues/12218#issuecomment-2346926743
Continuation from [this thread](https://github.com/apache/arrow-rs/issues/5827) This [investigation](https://github.com/apache/arrow-rs/issues/5827) did lead me to two other findings in which I think should be action'ed on. They are not `arrow-rs` related but Datafusion related. 1. `now()` and the default timestamp value should function similar to how other systems do it. Unless specified it should be using the local system timestamp. Not sure if this is desired but it appears to be how other systems work. 2. Datafusion needs to implement something similar to the following in Clickhouse for casting to timestamp with a specified timezone: ``` desc (SELECT toTimeZone('2024-09-10 11:45:19'::timestamp, 'America/Denver')::timestamp a); ┌─name─┬─type─────┬ │ a │ DateTime │ └──────┴──────────┴ desc (SELECT toTimeZone('2024-09-10 11:45:19'::timestamp, 'America/Denver')::timestamp('America/Los_Angeles') a); ┌─name─┬─type────────────────────────────┬ │ a │ DateTime('America/Los_Angeles') │ └──────┴─────────────────────────────────┴ ``` *I believe the functionality is there in the code since I see that the `Timestamp` datatype can have an input parameter of `Option(Timezone)` but I do not think the SQL parsing functionality operates as expected at this moment in time.* -- 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]
