Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature][SDK] Transform SQL supports CHAR_LENGTH function #11237

Closed
2 tasks done
Zkplo opened this issue Sep 28, 2024 · 0 comments · Fixed by #11275
Closed
2 tasks done

[Feature][SDK] Transform SQL supports CHAR_LENGTH function #11237

Zkplo opened this issue Sep 28, 2024 · 0 comments · Fixed by #11275
Assignees
Milestone

Comments

@Zkplo
Copy link
Contributor

Zkplo commented Sep 28, 2024

Description

CHAR_LENGTH(str): Returns the length of the string str, measured in code points. A multibyte character counts as a single code point. This means that, for a string containing two 3-byte characters, LENGTH() returns 6, whereas CHAR_LENGTH() returns 2

Use case

mysql> SET @dolphin:='海豚';

mysql> SELECT LENGTH(@dolphin), CHAR_LENGTH(@dolphin);
+------------------+-----------------------+
| LENGTH(@dolphin) | CHAR_LENGTH(@dolphin) |
+------------------+-----------------------+
|                6 |                     2 |
+------------------+-----------------------+
1 row in set (0.00 sec)

Are you willing to submit PR?

  • Yes, I am willing to submit a PR!

Code of Conduct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants