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

Overflow on converting valid Timestamp to Microseconds

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.0.3, 3.2.0, 3.1.3
    • Component/s: SQL
    • Labels:
      None

      Description

      scala> import org.apache.spark.sql.catalyst.util.DateTimeUtils._
      import org.apache.spark.sql.catalyst.util.DateTimeUtils._
      
      scala> instantToMicros(microsToInstant(Long.MinValue))
      java.lang.ArithmeticException: long overflow
        at java.lang.Math.multiplyExact(Math.java:892)
        at org.apache.spark.sql.catalyst.util.DateTimeUtils$.instantToMicros(DateTimeUtils.scala:389)
        ... 49 elided
      
      
      

        Attachments

          Activity

            People

            • Assignee:
              apachespark Apache Spark
              Reporter:
              Gengliang.Wang Gengliang Wang
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: