MaxGekk commented on a change in pull request #28576:
URL: https://github.com/apache/spark/pull/28576#discussion_r427139018
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/util/TimestampFormatterSuite.scala
##########
@@ -291,4 +291,95 @@ class TimestampFormatterSuite extends SparkFunSuite with
SQLHelper with Matchers
}
}
}
+
+ test("parsing hour with various patterns") {
+ def createFormatter(pattern: String): TimestampFormatter = {
+ // Use `SIMPLE_DATE_FORMAT`, so that the legacy parser also fails with
invalid value range.
+ TimestampFormatter(pattern, ZoneOffset.UTC,
LegacyDateFormats.SIMPLE_DATE_FORMAT, false)
Review comment:
You can import `UTC` from DateTimeTestUtils instead of spreading
ZoneOffset.UTC everywhere in tests.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]