You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Uroš Bojanić (Jira)" <ji...@apache.org> on 2026/09/02 11:23:00 UTC

[jira] [Resolved] (SPARK-58443) Wrong results or exception in instr and substring_index for an Int.MinValue position or count

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

Uroš Bojanić resolved SPARK-58443.
----------------------------------
    Fix Version/s: 4.3.0
       Resolution: Fixed

Issue resolved by pull request 57648
[https://github.com/apache/spark/pull/57648]

> Wrong results or exception in instr and substring_index for an Int.MinValue position or count
> ---------------------------------------------------------------------------------------------
>
>                 Key: SPARK-58443
>                 URL: https://issues.apache.org/jira/browse/SPARK-58443
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 5.0.0
>            Reporter: Eric Yang
>            Assignee: Eric Yang
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.3.0
>
>
> Wrong results for an Int.MinValue position or count:
> {code:sql}
> SELECT instr('abcabc', 'abc', -2147483648, 1);
> -- returns 4, expected 0
> SELECT substring_index('a.b.c', '.', -2147483648);
> -- throws NegativeArraySizeException, expected a.b.c
> SELECT substring_index(collate('a.b.c', 'UTF8_LCASE'), '.', -2147483648);
> -- returns '', expected a.b.c
> {code}



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