[
https://issues.apache.org/jira/browse/FLINK-41607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18150960#comment-18150960
]
Sergey Nuyanzin commented on FLINK-41607:
-----------------------------------------
Merged as
[3f57ef0b60c119a832dfa52cde798ed8ea5ad255|https://github.com/apache/flink/commit/3f57ef0b60c119a832dfa52cde798ed8ea5ad255]
> Count chars while CHAR_LENGTH without encoding it
> -------------------------------------------------
>
> Key: FLINK-41607
> URL: https://issues.apache.org/jira/browse/FLINK-41607
> Project: Flink
> Issue Type: Improvement
> Components: API / Core, Table SQL / Runtime
> Reporter: Sergey Nuyanzin
> Assignee: Sergey Nuyanzin
> Priority: Major
> Labels: pull-request-available
>
> CHAR_LENGTH calls BinaryStringData#numChars. When the value holds a Java
> string, numChars first
> encodes the whole string to UTF-8 and then counts characters by walking the
> bytes one by one.
> When the value is already UTF-8 bytes, it also walks them one byte at a time,
> even when they're
> all ASCII.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)