Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-31702

Old POSIXlt, POSIXct and Date become corrupt due to calendar difference

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.4.5, 3.0.0
    • None
    • SparkR, SQL
    • None

    Description

      Old POSIXlt, POSIXct and Date become corrupt in SparkR. For example, see below:

      # Non-existent timestamp in hybrid Julian and Gregorian Calendar
      showDF(createDataFrame(as.data.frame(list(list(POSIXct=as.POSIXct("1582-10-10 00:01:00"), POSIXlt=as.POSIXlt("1582-10-10 00:01:00"))))))
      
      +-------------------+-------------------+
      |            POSIXct|            POSIXlt|
      +-------------------+-------------------+
      |1582-09-30 00:33:08|1582-09-30 00:33:08|
      +-------------------+-------------------+
      

      See https://docs.google.com/document/d/1an3Mzv6s0naO4mDwGFHJ48gLT--6EliA1GG3kbgBymo/edit?usp=sharing

      Note that the results seem wrong from the very first implementation. The cause seems because R side uses Proleptic Gregorian calendar but JVM side is using hybrid Juilian and Gregoiran calendar.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              gurwls223 Hyukjin Kwon
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: