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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to