[ 
https://issues.apache.org/jira/browse/FLINK-41319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18137308#comment-18137308
 ] 

sepuri sai krishna commented on FLINK-41319:
--------------------------------------------

I have a fix and tests for this locally. Please assign it to me and I will open 
a PR.

> REGEXP_INSTR disagrees with POSITION, LOCATE and INSTR for characters outside 
> the BMP
> -------------------------------------------------------------------------------------
>
>                 Key: FLINK-41319
>                 URL: https://issues.apache.org/jira/browse/FLINK-41319
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Runtime
>    Affects Versions: 2.4.0
>            Reporter: sepuri sai krishna
>            Priority: Minor
>
> All four functions are documented as returning the position of a match, with 
> indexes beginning at 1.
> They disagree as soon as the string holds a character outside the BMP.
> {code:sql}
> -- four characters, each outside the BMP
> SELECT REGEXP_INSTR('𝕏𝕐𝕒𝕓', '𝕒'), POSITION('𝕒' IN '𝕏𝕐𝕒𝕓'),
>        LOCATE('𝕒', '𝕏𝕐𝕒𝕓'), INSTR('𝕏𝕐𝕒𝕓', '𝕒');
> {code}
> Returns {{5, 3, 3, 3}}. The match is the third character. On a string without 
> such characters all
> four agree.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to