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

    https://github.com/apache/spark/pull/8400#discussion_r37828796
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/DateTimeUtilsSuite.scala
 ---
    @@ -49,13 +49,18 @@ class DateTimeUtilsSuite extends SparkFunSuite {
       test("us and julian day") {
         val (d, ns) = toJulianDay(0)
         assert(d === JULIAN_DAY_OF_EPOCH)
    -    assert(ns === SECONDS_PER_DAY / 2 * NANOS_PER_SECOND)
    +    assert(ns === 0)
         assert(fromJulianDay(d, ns) == 0L)
     
         val t = new Timestamp(61394778610000L) // (2015, 6, 11, 10, 10, 10, 
100)
    --- End diff --
    
    The extra 1900 years and 1 month seems to be related to this Javadoc of one 
of `Timestamp`'s constructor (which is super duper confusing):
    
    ```java
        /**
         * Constructs a <code>Timestamp</code> object initialized
         * with the given values.
         *
         * @param year the year minus 1900
         * @param month 0 to 11
         * @param date 1 to 31
         * @param hour 0 to 23
         * @param minute 0 to 59
         * @param second 0 to 59
         * @param nano 0 to 999,999,999
         * @deprecated instead use the constructor <code>Timestamp(long 
millis)</code>
         * @exception IllegalArgumentException if the nano argument is out of 
bounds
         */
    ```


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to