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

Wenchen Fan resolved SPARK-49204.
---------------------------------
    Fix Version/s: 4.0.0
       Resolution: Fixed

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

> Handle surrogate pairs properly
> -------------------------------
>
>                 Key: SPARK-49204
>                 URL: https://issues.apache.org/jira/browse/SPARK-49204
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 4.0.0
>            Reporter: Uroš Bojanić
>            Assignee: Uroš Bojanić
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>
> Fix the following string expressions to handle one-to-many case mapping 
> properly:
>  * StringReplace
>  * StringInstr
>  * StringLocate
>  * SubstringIndex
>  * StringTrim
>  * StringTrimLeft
>  * StringTrimRight
>  
> Examples of incorrect results (under {{ICU}} collations):
> {code:java}
> StringReplace("😄a", "a", "b") // returns: "😄ab" (incorrect), instead of: "😄b" 
> (correct){code}
>  
> {code:java}
> StringInstr("😄a", "a") // returns: 3 (incorrect), instead of: 2 
> (correct){code}
>  
> {code:java}
> StringLocate("a", "😄a") // returns: 3 (incorrect), instead of: 2 
> (correct){code}
>  
> {code:java}
> SubstringIndex("😄a", "a") // returns: "😄a" (incorrect), instead of: "😄" 
> (correct){code}
>  
> {code:java}
> StringTrim("😄", "😄") // returns: "😄" (incorrect), instead of: "" 
> (correct){code}
>  
> {code:java}
> StringTrimLeft("😄", "😄") // returns: "😄" (incorrect), instead of: "" 
> (correct){code}
>  
> {code:java}
> StringTrimRight("😄", "😄") // returns: "😄" (incorrect), instead of: "" 
> (correct){code}



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