You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/02/10 10:20:31 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #27494: [SPARK-30760][SQL] Port `millisToDays` and `daysToMillis` on Java 8 time API

cloud-fan commented on a change in pull request #27494: [SPARK-30760][SQL] Port `millisToDays` and `daysToMillis` on Java 8 time API
URL: https://github.com/apache/spark/pull/27494#discussion_r376974086
 
 

 ##########
 File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/DateExpressionsSuite.scala
 ##########
 @@ -494,7 +494,7 @@ class DateExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper {
     // Valid range of DateType is [0001-01-01, 9999-12-31]
     val maxMonthInterval = 10000 * 12
     checkEvaluation(
-      AddMonths(Literal(Date.valueOf("0001-01-01")), Literal(maxMonthInterval)), 2933261)
+      AddMonths(Literal(LocalDate.parse("0001-01-01")), Literal(maxMonthInterval)), 2933263)
 
 Review comment:
   can we place the hardcoded `2933263` with `LocalDate.of(10001, 1, 1).toEpochDay`?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org