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

Uroลก Bojaniฤ‡ updated SPARK-49204:
---------------------------------
    Description: 
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}

  was:
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}
ย 

ย 

ย 


> 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ฤ‡
>            Priority: Major
>              Labels: pull-request-available
>
> 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