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

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


The following commit(s) were added to refs/heads/branch-4.0 by this push:
     new 9f9ae5f7f92 branch-4.0: [Enhancement](RE2) Silence RE2 stderr in 
regexp function #60303 (#60328)
9f9ae5f7f92 is described below

commit 9f9ae5f7f92055191e2428a63fa8fc617e73ff87
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Jan 29 10:19:26 2026 +0800

    branch-4.0: [Enhancement](RE2) Silence RE2 stderr in regexp function #60303 
(#60328)
    
    Cherry-picked from #60303
    
    Co-authored-by: linrrarity <[email protected]>
---
 be/src/vec/functions/function_regexp.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/be/src/vec/functions/function_regexp.cpp 
b/be/src/vec/functions/function_regexp.cpp
index d24a0538c04..bd66900b348 100644
--- a/be/src/vec/functions/function_regexp.cpp
+++ b/be/src/vec/functions/function_regexp.cpp
@@ -64,7 +64,11 @@ struct RegexpExtractEngine {
     // Try to compile with RE2 first, fallback to Boost.Regex if RE2 fails
     static bool compile(const StringRef& pattern, std::string* error_str,
                         RegexpExtractEngine& engine, bool 
enable_extended_regex) {
-        engine.re2_regex = 
std::make_unique<re2::RE2>(re2::StringPiece(pattern.data, pattern.size));
+        re2::RE2::Options options;
+        options.set_log_errors(false); // avoid RE2 printing to stderr; we 
handle errors ourselves
+        engine.re2_regex =
+                std::make_unique<re2::RE2>(re2::StringPiece(pattern.data, 
pattern.size), options);
+
         if (engine.re2_regex->ok()) {
             return true;
         } else if (!enable_extended_regex) {


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

Reply via email to