You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by JoshRosen <gi...@git.apache.org> on 2016/06/13 01:47:36 UTC

[GitHub] spark pull request #6983: [SPARK-6785][SQL] fix DateTimeUtils for dates befo...

Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6983#discussion_r66732804
  
    --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/DateTimeUtilsSuite.scala ---
    @@ -48,4 +49,41 @@ class DateTimeUtilsSuite extends SparkFunSuite {
         val t2 = DateTimeUtils.toJavaTimestamp(DateTimeUtils.fromJulianDay(d1, ns1))
         assert(t.equals(t2))
       }
    +
    +  test("SPARK-6785: java date conversion before and after epoch") {
    +    def checkFromToJavaDate(d1: Date): Unit = {
    +      val d2 = DateTimeUtils.toJavaDate(DateTimeUtils.fromJavaDate(d1))
    +      assert(d2.toString === d1.toString)
    --- End diff --
    
    Shouldn't it also be the case that `d1 === d2`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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