Omega359 opened a new pull request, #19078: URL: https://github.com/apache/datafusion/pull/19078
## Which issue does this PR close? Closes https://github.com/apache/datafusion/issues/17998. Continuation of PR #18025 by @kosiew ## Rationale for this change Previously, the to_timestamp() family of functions (to_timestamp, to_timestamp_seconds, to_timestamp_millis, to_timestamp_micros, to_timestamp_nanos) always interpreted timezone-free (naïve) timestamps as UTC, ignoring the datafusion.execution.time_zone configuration option. This behavior caused inconsistencies when users configured a specific execution timezone and expected timestamp conversions to respect it. This PR introduces full timezone awareness to these functions so that: - Naïve timestamp strings are interpreted as being in the configured execution timezone, or UTC if the configured execution timezone is `None`. - All returned timestamps are in the execution timezone. ## What changes are included in this PR? Code, tests. ## Are these changes tested? Yes, via code tests and slt tests. ## Are there any user-facing changes? Yes: - to_timestamp() and its precision variants now respect datafusion.execution.time_zone when parsing timezone-free timestamps and return timestamps in the execution time zone.. These changes make timestamp functions consistent with session timezone semantics and improve correctness for global workloads. -- 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]
