You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "github-actions[bot] (via GitHub)" <gi...@apache.org> on 2023/04/22 02:56:09 UTC

[GitHub] [doris] github-actions[bot] commented on a diff in pull request #18925: [optimize](string) optimize char_length function by SIMD

github-actions[bot] commented on code in PR #18925:
URL: https://github.com/apache/doris/pull/18925#discussion_r1174263569


##########
be/src/vec/functions/function_string.cpp:
##########
@@ -263,7 +263,8 @@ struct StringInStrImpl {
         // Hive returns positions starting from 1.
         int loc = search.search(&strl);
         if (loc > 0) {
-            loc = get_char_len(strl, loc);
+            size_t len = std::min((size_t)loc, str_sv.size);

Review Comment:
   warning: use of undeclared identifier 'str_sv' [clang-diagnostic-error]
   ```cpp
               size_t len = std::min((size_t)loc, str_sv.size);
                                                  ^
   ```
   



##########
be/src/vec/functions/function_string.cpp:
##########
@@ -263,7 +263,8 @@
         // Hive returns positions starting from 1.
         int loc = search.search(&strl);
         if (loc > 0) {
-            loc = get_char_len(strl, loc);
+            size_t len = std::min((size_t)loc, str_sv.size);
+            loc = simd::VStringFunctions::get_char_len(str_sv.data, len);

Review Comment:
   warning: use of undeclared identifier 'str_sv' [clang-diagnostic-error]
   ```cpp
               loc = simd::VStringFunctions::get_char_len(str_sv.data, len);
                                                          ^
   ```
   



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org