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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.4.5, 3.0.0
    • Fix Version/s: None
    • Component/s: SparkR, SQL
    • Labels:
      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

              • Assignee:
                Unassigned
                Reporter:
                hyukjin.kwon Hyukjin Kwon
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: