MaxGekk commented on a change in pull request #27980: [WIP][SQL] Rebase any
date-times in conversions to/from Java types
URL: https://github.com/apache/spark/pull/27980#discussion_r396128065
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CollectionExpressionsSuite.scala
##########
@@ -856,23 +858,23 @@ class CollectionExpressionsSuite extends SparkFunSuite
with ExpressionEvalHelper
Literal(Timestamp.valueOf("2018-03-25 03:30:00")),
Literal(stringToInterval("interval 30 minutes"))),
Seq(
- Timestamp.valueOf("2018-03-25 01:30:00"),
- Timestamp.valueOf("2018-03-25 03:00:00"),
- Timestamp.valueOf("2018-03-25 03:30:00")))
+ ts("2018-03-25 01:30:00"),
+ ts("2018-03-25 03:00:00"),
+ ts("2018-03-25 03:30:00")))
// Autumn time change
checkEvaluation(new Sequence(
Literal(Timestamp.valueOf("2018-10-28 01:30:00")),
Literal(Timestamp.valueOf("2018-10-28 03:30:00")),
Literal(stringToInterval("interval 30 minutes"))),
Seq(
- Timestamp.valueOf("2018-10-28 01:30:00"),
- noDST(Timestamp.valueOf("2018-10-28 02:00:00")),
- noDST(Timestamp.valueOf("2018-10-28 02:30:00")),
- Timestamp.valueOf("2018-10-28 02:00:00"),
- Timestamp.valueOf("2018-10-28 02:30:00"),
- Timestamp.valueOf("2018-10-28 03:00:00"),
- Timestamp.valueOf("2018-10-28 03:30:00")))
+ ts("2018-10-28 01:30:00"),
+ ts("2018-10-28 02:00:00", noDST = true),
Review comment:
I had to change the test because of the 2 lines. I wasn't able to build 2
timestamps via `Timestamp.valueOf` after rebasing. `Timestamp` class does
normalization underneath, and replaces milliseconds since the epoch, and as a
consequence of that checking of the results fails. Even textual representation,
and `year`, `month`, ... `nanos` are the same.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]