You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Akash Nayar (Jira)" <ji...@apache.org> on 2026/04/22 07:54:00 UTC

[jira] [Created] (SPARK-56567) Fix array_insert handling of Int.MinValue position

Akash Nayar created SPARK-56567:
-----------------------------------

             Summary: Fix array_insert handling of Int.MinValue position
                 Key: SPARK-56567
                 URL: https://issues.apache.org/jira/browse/SPARK-56567
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 4.2.0
            Reporter: Akash Nayar


array_insert tries to calculate `-pos`, which will overflow when `pos == Int.MinValue`, failing with an internal error instead of raising COLLECTION_SIZE_LIMIT_EXCEEDED.FUNCTION. Fix by promoting pos to `Long` for all arithmetic.



--
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