You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Kevin Su (Jira)" <ji...@apache.org> on 2021/06/09 03:13:00 UTC

[jira] [Issue Comment Deleted] (SPARK-35679) Overflow on converting valid Timestamp to Microseconds

     [ https://issues.apache.org/jira/browse/SPARK-35679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Su updated SPARK-35679:
-----------------------------
    Comment: was deleted

(was: Long.MinValue = -9223372036854775808

I think the time should not be negative)

> Overflow on converting valid Timestamp to Microseconds
> ------------------------------------------------------
>
>                 Key: SPARK-35679
>                 URL: https://issues.apache.org/jira/browse/SPARK-35679
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.2.0
>            Reporter: Gengliang Wang
>            Priority: Major
>
> {code:java}
> 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
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org