MaxGekk commented on a change in pull request #23512: [SPARK-26593][SQL] Use
Proleptic Gregorian calendar in casting UTF8String to Date/TimestampType
URL: https://github.com/apache/spark/pull/23512#discussion_r247327559
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetQuerySuite.scala
##########
@@ -187,12 +186,12 @@ class ParquetQuerySuite extends QueryTest with
ParquetTest with SharedSQLContext
sql("insert into ts values (1, '2016-01-01 10:11:12.123456')")
sql("insert into ts values (2, null)")
sql("insert into ts values (3, '1965-01-01 10:11:12.123456')")
- checkAnswer(
- sql("select * from ts"),
- Seq(
- Row(1, Timestamp.valueOf("2016-01-01 10:11:12.123456")),
- Row(2, null),
- Row(3, Timestamp.valueOf("1965-01-01 10:11:12.123456"))))
Review comment:
Using `Timestamp` to hold number of seconds from epoch is ok but any other
methods that involve the hybrid calendar can cause calendar related issue. I
changed it to `cast` since it is ported on new Java 8 API (java.time) in the
PR.
----------------------------------------------------------------
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]