mrhhsg commented on code in PR #68428:
URL: https://github.com/apache/doris/pull/68428#discussion_r4082878317


##########
be/src/exprs/function/function_regexp.cpp:
##########
@@ -145,13 +145,12 @@ struct RegexpExtractEngine {
                 return; // No capturing groups
             }
 
+            const re2::StringPiece input(data, size);
             size_t pos = 0;
             while (pos < size) {
-                const char* str_pos = data + pos;
-                size_t str_size = size - pos;
                 std::vector<re2::StringPiece> matches(max_matches);
-                bool success = re2_regex->Match(re2::StringPiece(str_pos, 
str_size), 0, str_size,
-                                                re2::RE2::UNANCHORED, 
matches.data(), max_matches);
+                bool success = re2_regex->Match(input, pos, size, 
re2::RE2::UNANCHORED,

Review Comment:
   Addressed in d629ea24c8a: empty matches now advance from the offset returned 
by RE2 and terminate when that offset is the subject end. Added 10,000-byte 
word-boundary coverage for regexp_count, regexp_extract_all, and 
regexp_extract_all_array in both focused BE unit tests and regression tests.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to