vrjdev commented on code in PR #58946:
URL: https://github.com/apache/spark/pull/58946#discussion_r4401052956
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala:
##########
@@ -1047,6 +1048,13 @@ object CatalogColumnStat extends Logging {
case TimestampType => getTimestampFormatter(isParsing = true).parse(s)
case TimestampNTZType =>
getTimestampFormatter(isParsing = true, forTimestampNTZ =
true).parse(s)
+ case t: TimestampLTZNanosType =>
Review Comment:
Yes, it did threw for TIMESTAMP_LTZ: under LEGACY, Spark picks the old
formatter, which can't handle nanoseconds and throws
TIMESTAMP_NANOS_WITH_LEGACY_TIME_PARSER. So ANALYZE failed, and stats written
by another session couldn't be read back. NTZ wasn't affected. Since the stats
string is an internal format, nanosecond stats now always use the ISO 8601
formatter regardless of the policy, and I added tests that write and read stats
under every policy.
--
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]