HyukjinKwon commented on a change in pull request #23597: [SPARK-26653][SQL]
Use Proleptic Gregorian calendar in parsing JDBC lower/upper bounds
URL: https://github.com/apache/spark/pull/23597#discussion_r249811950
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala
##########
@@ -1523,4 +1523,37 @@ class JDBCSuite extends QueryTest
assert(e.contains("The driver could not open a JDBC connection. " +
"Check the URL: jdbc:mysql://localhost/db"))
}
+
+ test("parsing timestamp bounds") {
+ DateTimeTestUtils.outstandingTimezonesIds.foreach { timeZone =>
+ withSQLConf(SQLConf.SESSION_LOCAL_TIMEZONE.key -> timeZone) {
+ Seq(
+ ("1972-07-04 03:30:00", "1972-07-15 20:50:32.5", "1972-07-27
14:11:05"),
+ ("2019-01-20 12:00:00.502", "2019-01-20 12:00:00.751", "2019-01-20
12:00:01.000"),
+ (
Review comment:
scalastyle is kind of a automatic tool and it has limitation for style. Some
of files are somehow not being checked for some reasons, and it, for instance,
cannot check some patterns like
https://github.com/databricks/scala-style-guide#anonymous-methods.
Can this be inlined like
```scala
("1972-07-04 03:30:00", "1972-07-15 20:50:32.5", "1972-07-27
14:11:05"),
("2019-01-20 12:00:00.502", "2019-01-20 12:00:00.751", "2019-01-20
12:00:01.000"),
("2019-01-20T00:00:00.123456", "2019-01-20 00:05:00.123456",
"2019-01-20T00:10:00.123456"),
("1500-01-20T00:00:00.123456", "1500-01-20 00:05:00.123456",
"1500-01-20T00:10:00.123456")
```
or
```
("1972-07-04 03:30:00", "1972-07-15 20:50:32.5", "1972-07-27
14:11:05"),
("2019-01-20 12:00:00.502", "2019-01-20 12:00:00.751", "2019-01-20
12:00:01.000"),
("2019-01-20T00:00:00.123456", "2019-01-20 00:05:00.123456",
"2019-01-20T00:10:00.123456"),
("1500-01-20T00:00:00.123456", "1500-01-20 00:05:00.123456",
"1500-01-20T00:10:00.123456")
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]