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

Overflow on converting valid Timestamp to Microseconds

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.2.0
    • 3.0.3, 3.2.0, 3.1.3
    • SQL
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment