iRakson opened a new pull request, #57008: URL: https://github.com/apache/spark/pull/57008
### What changes were proposed in this pull request? Extends ConvertTimezone (convert_timezone()) to accept nanosecond-precision timestamps (TIMESTAMP_NTZ(p), p in [7, 9]) as input, alongside the existing microsecond TimestampType inputs. ConvertTimezone would returns a nanosecond NTZ value at the same precision with the remainder preserved in case of TIMESTAMP_NTZ(p). Existing microsecond computation won't be affected by this change. ### Why are the changes needed? ConvertTimezone types its source as TimestampNTZType only and returns TimestampNTZType, using convertTimestampNtzToAnotherTz(Long, ...). It rejects all nanosecond timestamp types. We should allow TIMESTAMP_NTZ(p). ### Does this PR introduce _any_ user-facing change? Yes, convert_timezone function would accept TIMESTAMP_NTZ(p) and return NTZ value at same precision with remainder preserved. ### How was this patch tested? Added unit tests in DateExpressionsSuite.scala and also generated golden files. ### Was this patch authored or co-authored using generative AI tooling? Used claude code for writing UTs and generating golden files. -- 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]
