From be1d5a315149940be0e53e5ea8b5bad5b37622fc Mon Sep 17 00:00:00 2001 From: zy-kkk Date: Wed, 31 Jan 2024 20:52:33 +0800 Subject: [PATCH] [fix](compile)Fix Ambiguous regex Namespace Issue on MacOS Compilation (#30652) --- be/src/olap/delete_handler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/be/src/olap/delete_handler.cpp b/be/src/olap/delete_handler.cpp index 29f845636277866..b3096d353a0be32 100644 --- a/be/src/olap/delete_handler.cpp +++ b/be/src/olap/delete_handler.cpp @@ -303,7 +303,7 @@ Status DeleteHandler::parse_condition(const std::string& condition_str, TConditi // group3: ((?:[\s\S]+)?) matches "1597751948193618247 and length(source)<1;\n;\n" const char* const CONDITION_STR_PATTERN = R"(([\w$#%]+)\s*((?:=)|(?:!=)|(?:>>)|(?:<<)|(?:>=)|(?:<=)|(?:\*=)|(?:IS))\s*('((?:[\s\S]+)?)'|(?:[\s\S]+)?))"; - regex ex(CONDITION_STR_PATTERN); + boost::regex ex(CONDITION_STR_PATTERN); if (regex_match(condition_str, what, ex)) { if (condition_str.size() != what[0].str().size()) { matched = false; @@ -311,7 +311,7 @@ Status DeleteHandler::parse_condition(const std::string& condition_str, TConditi } else { matched = false; } - } catch (regex_error& e) { + } catch (boost::regex_error& e) { VLOG_NOTICE << "fail to parse expr. [expr=" << condition_str << "; error=" << e.what() << "]"; matched = false;