Sergey Nuyanzin created FLINK-41607:
---------------------------------------
Summary: 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
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)