This is an automated email from the ASF dual-hosted git repository.

dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new 945f776ac1d [cherry-pick](branch-30) fix split_by_regexp meet empty 
string return error (#51293) (#51862)
945f776ac1d is described below

commit 945f776ac1d6d5607c84eb195aa9f293968138f1
Author: zhangstar333 <[email protected]>
AuthorDate: Thu Jun 19 16:35:33 2025 +0800

    [cherry-pick](branch-30) fix split_by_regexp meet empty string return error 
(#51293) (#51862)
    
    Problem Summary:
    cherry-pick from master #51293
---
 be/src/vec/functions/function_split_by_regexp.cpp      |   3 ---
 .../string_functions/test_split_by_regexp.out          | Bin 987 -> 1387 bytes
 .../string_functions/test_split_by_regexp.groovy       |   2 ++
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/be/src/vec/functions/function_split_by_regexp.cpp 
b/be/src/vec/functions/function_split_by_regexp.cpp
index 40628ee2017..f2c419ec220 100644
--- a/be/src/vec/functions/function_split_by_regexp.cpp
+++ b/be/src/vec/functions/function_split_by_regexp.cpp
@@ -247,9 +247,6 @@ private:
         if (pattern_ref.size) {
             re2_ptr = std::make_unique<re2::RE2>(pattern_ref.to_string_view(), 
*opts);
         }
-        if (!re2_ptr->ok()) {
-            return Status::RuntimeError("Invalid pattern: {}", 
pattern_ref.debug_string());
-        }
         RegexpSplit RegexpSplit;
         RegexpSplit.init(re2_ptr.get(), limit_value);
         for (int row = 0; row < input_rows_count; ++row) {
diff --git 
a/regression-test/data/query_p0/sql_functions/string_functions/test_split_by_regexp.out
 
b/regression-test/data/query_p0/sql_functions/string_functions/test_split_by_regexp.out
index 1fb99f58ab1..483d9d89f87 100644
Binary files 
a/regression-test/data/query_p0/sql_functions/string_functions/test_split_by_regexp.out
 and 
b/regression-test/data/query_p0/sql_functions/string_functions/test_split_by_regexp.out
 differ
diff --git 
a/regression-test/suites/query_p0/sql_functions/string_functions/test_split_by_regexp.groovy
 
b/regression-test/suites/query_p0/sql_functions/string_functions/test_split_by_regexp.groovy
index 4b9719068e6..394a8e721aa 100644
--- 
a/regression-test/suites/query_p0/sql_functions/string_functions/test_split_by_regexp.groovy
+++ 
b/regression-test/suites/query_p0/sql_functions/string_functions/test_split_by_regexp.groovy
@@ -70,5 +70,7 @@ suite("test_split_by_regexp") {
     qt_select11 "select split_by_regexp('aa,bbb,cccc', ',', 4);"
     qt_select12 "select split_by_regexp('aa,bbb,cccc', ',', 100000000);"
     qt_select13 "select split_by_regexp('aa,bbb,cccc', ',', 10000000000000);"
+    qt_select14 "select v1,split_by_regexp(v1, '') from test_split_by_regexp 
order by k1;"
+    qt_select15 "select v2,split_by_regexp(v2, '') from test_split_by_regexp 
order by k1;"
 }
 


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

Reply via email to