Apache Doris 中文技术论坛
Questions Tags Users Badges

length函数返回不是字节数

Asked Feb 7, 2025 Modified Feb 8, 2025
Viewed 139
2.1 functions

中国的utf8编码,字节数不应该是6吗?文档中说是返回字节数,例子中返回了字符数
image.png

edited Feb 8, 2025
jason3
asked Feb 7, 2025
3 Answers

https://github.com/apache/doris/pull/46523
已修复,请更新到2.1.8再测试

edited Jan 1, 1970
zclllyybb551
answered Feb 7, 2025

version:2.0.9
image.png

edited Jan 1, 1970
xxxl20
answered Feb 7, 2025

这个是之前搞的常量折叠有问题,导致文档写错了

https://github.com/apache/doris/pull/40947

mysql> select length("中国");
+------------------+
| length('中国')   |
+------------------+
|                6 |
+------------------+
edited Jan 1, 1970
11
answered Feb 7, 2025
Related Questions
doris2.1.11读取spark报错
1 answers
doris2.1.11脚本执行报failed to send brpc when exchange
1 answers
SelectDB Doris 2.1.8-3:CCR 下游集群 20 台 BE 缩容 1 台时 lag 持续增大,取消缩容后恢复
1 answers
jetty 安全漏洞CVE-2026-10050
1 answers
通过spark connector写入数据时,doris.fenodes配置了多个节点,但只有第一个节点生效。
1 answers
SelectDB Doris 2.1.8-3 升级使用灵活部分列更新,推荐版本及升级流程咨询
1 answers

Terms of service Privacy policy

Powered by Answer - the open-source software that powers Q&A communities.
Made with love © 2026 Apache Doris 中文技术论坛.