-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[fix](function) fix Substring/SubReplace error result with input utf8 string #40929
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
run buildall |
TPC-H: Total hot run time: 41849 ms
|
TeamCity be ut coverage result: |
TPC-DS: Total hot run time: 199197 ms
|
ClickBench: Total hot run time: 31.84 s
|
ColumnString::Offsets& res_offsets = result_column->get_offsets(); | ||
PaddedPODArray<size_t> index; | ||
|
||
for (size_t row = 0; row < input_rows_count; ++row) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
recheck the logic again?
run buildall |
TPC-H: Total hot run time: 42087 ms
|
TeamCity be ut coverage result: |
TPC-DS: Total hot run time: 195066 ms
|
ClickBench: Total hot run time: 32.56 s
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
… string (apache#40929) ``` mysql [(none)]>select sub_replace("你好世界","a",1); +-------------------------------------+ | sub_replace('你好世界', 'a', 1) | +-------------------------------------+ | �a�好世界 | +-------------------------------------+ mysql [(none)]>select SUBSTRING('中文测试',5); +------------------------------------------+ | substring('中文测试', 5, 2147483647) | +------------------------------------------+ | 中文测试 | +------------------------------------------+ 1 row in set (0.04 sec) now mysql [(none)]>select sub_replace("你好世界","a",1); +-------------------------------------+ | sub_replace('你好世界', 'a', 1) | +-------------------------------------+ | 你a世界 | +-------------------------------------+ 1 row in set (0.05 sec) mysql [(none)]>select SUBSTRING('中文测试',5); +------------------------------------------+ | substring('中文测试', 5, 2147483647) | +------------------------------------------+ | | +------------------------------------------+ 1 row in set (0.13 sec) ```
#40954) … string (#40929) #40929 ``` mysql [(none)]>select sub_replace("你好世界","a",1); +-------------------------------------+ | sub_replace('你好世界', 'a', 1) | +-------------------------------------+ | �a�好世界 | +-------------------------------------+ mysql [(none)]>select SUBSTRING('中文测试',5); +------------------------------------------+ | substring('中文测试', 5, 2147483647) | +------------------------------------------+ | 中文测试 | +------------------------------------------+ 1 row in set (0.04 sec) now mysql [(none)]>select sub_replace("你好世界","a",1); +-------------------------------------+ | sub_replace('你好世界', 'a', 1) | +-------------------------------------+ | 你a世界 | +-------------------------------------+ 1 row in set (0.05 sec) mysql [(none)]>select SUBSTRING('中文测试',5); +------------------------------------------+ | substring('中文测试', 5, 2147483647) | +------------------------------------------+ | | +------------------------------------------+ 1 row in set (0.13 sec) ``` ## Proposed changes Issue Number: close #xxx <!--Describe your changes.-->
… string (#40929) ``` mysql [(none)]>select sub_replace("你好世界","a",1); +-------------------------------------+ | sub_replace('你好世界', 'a', 1) | +-------------------------------------+ | �a�好世界 | +-------------------------------------+ mysql [(none)]>select SUBSTRING('中文测试',5); +------------------------------------------+ | substring('中文测试', 5, 2147483647) | +------------------------------------------+ | 中文测试 | +------------------------------------------+ 1 row in set (0.04 sec) now mysql [(none)]>select sub_replace("你好世界","a",1); +-------------------------------------+ | sub_replace('你好世界', 'a', 1) | +-------------------------------------+ | 你a世界 | +-------------------------------------+ 1 row in set (0.05 sec) mysql [(none)]>select SUBSTRING('中文测试',5); +------------------------------------------+ | substring('中文测试', 5, 2147483647) | +------------------------------------------+ | | +------------------------------------------+ 1 row in set (0.13 sec) ```
Proposed changes