MaxGekk commented on a change in pull request #28345:
URL: https://github.com/apache/spark/pull/28345#discussion_r415366061
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/util/DateFormatterSuite.scala
##########
@@ -47,45 +48,54 @@ class DateFormatterSuite extends SparkFunSuite with
SQLHelper {
}
test("roundtrip date -> days -> date") {
- Seq(
- "0050-01-01",
- "0953-02-02",
- "1423-03-08",
- "1969-12-31",
- "1972-08-25",
- "1975-09-26",
- "2018-12-12",
- "2038-01-01",
- "5010-11-17").foreach { date =>
- DateTimeTestUtils.outstandingTimezonesIds.foreach { timeZone =>
- withSQLConf(SQLConf.SESSION_LOCAL_TIMEZONE.key -> timeZone) {
- val formatter = DateFormatter(getZoneId(timeZone))
- val days = formatter.parse(date)
- val formatted = formatter.format(days)
- assert(date === formatted)
+ LegacyBehaviorPolicy.values.foreach { parserPolicy =>
+ withSQLConf("spark.sql.legacy.timeParserPolicy" ->
parserPolicy.toString) {
Review comment:
Use `LEGACY_TIME_PARSER_POLICY.key`
----------------------------------------------------------------
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]