You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "L. C. Hsieh (Jira)" <ji...@apache.org> on 2023/11/07 05:53:00 UTC

[jira] [Created] (SPARK-45816) Return null when overflowing during casting from timestamp to integers

L. C. Hsieh created SPARK-45816:
-----------------------------------

             Summary: Return null when overflowing during casting from timestamp to integers
                 Key: SPARK-45816
                 URL: https://issues.apache.org/jira/browse/SPARK-45816
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 3.5.0, 3.4.1, 3.3.3
            Reporter: L. C. Hsieh


Spark cast works in two modes: ansi and non-ansi. When overflowing during casting, the common behavior under non-ansi mode is to return null. However, casting from Timestamp to Int/Short/Byte returns a wrapping value now. The behavior to silently overflow doesn't make sense.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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