[
https://issues.apache.org/jira/browse/FLINK-41318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18137307#comment-18137307
]
sepuri sai krishna commented on FLINK-41318:
--------------------------------------------
I have a fix and tests for this locally. Please assign it to me and I will open
a PR.
> ASCII returns a negative number for characters outside US-ASCII
> ---------------------------------------------------------------
>
> Key: FLINK-41318
> URL: https://issues.apache.org/jira/browse/FLINK-41318
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / Planner
> Affects Versions: 2.4.0
> Reporter: sepuri sai krishna
> Priority: Minor
>
> {{ASCII}} is documented as "Returns the numeric value of the first character
> of string". For a
> character outside US-ASCII it returns a negative number.
> {code:sql}
> SELECT ASCII('a'), ASCII('é'), ASCII('中');
> {code}
> Returns {{97, -61, -28}}. No character has a negative numeric value. {{CHR}}
> is documented for 0 to
> 255, so the results cannot be fed back into it either.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)