morningman commented on a change in pull request #3345:
URL: https://github.com/apache/incubator-doris/pull/3345#discussion_r416327527
##########
File path: gensrc/script/doris_builtins_functions.py
##########
@@ -533,6 +533,8 @@
'15FunctionContextERKNS1_9StringValERKNS1_6IntValES6_'],
[['length'], 'INT', ['VARCHAR'],
'_ZN5doris15StringFunctions6lengthEPN9doris_udf15FunctionContextERKNS1_9StringValE'],
+ [['char_length_utf8'], 'INT', ['VARCHAR'],
Review comment:
I found that in mysql , it calls `char_length()`,
https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_char-length
So I think `char_length` is enough, and this function is unrelated with the
encoding。
`char_length_utf8('中国')` and `char_length_gbk('中国')` should both return `2`.
So the suffix `_utf8` is unnecessary.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]