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

    https://github.com/apache/spark/pull/17997#discussion_r116952974
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
 ---
    @@ -603,7 +603,13 @@ object DateTimeUtils {
        */
       private[this] def getYearAndDayInYear(daysSince1970: SQLDate): (Int, 
Int) = {
         // add the difference (in days) between 1.1.1970 and the artificial 
year 0 (-17999)
    -    val daysNormalized = daysSince1970 + toYearZero
    +    var  daysSince1970Tmp = daysSince1970
    +    // In history,the period(5.10.1582 ~ 14.10.1582) is not exist
    --- End diff --
    
    I have tested like this:
    `val dav = Date.valueOf("1582-10-14")
      val date = new Date(dav.getTime);
      println(date.toString)`
    the output is:`1582-10-24`
    `val dav = Date.valueOf("1582-10-05")
      val date = new Date(dav.getTime);
      println(date.toString)`
    the output is:`1582-10-15`
    so, i think we can not use `1582-10-5` ~ `1582-10-14`


---
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