Skip to content

Commit

Permalink
[fix](compile)Fix Ambiguous regex Namespace Issue on MacOS Compilation (
Browse files Browse the repository at this point in the history
  • Loading branch information
zy-kkk authored and Doris-Extras committed Jan 31, 2024
1 parent 39a6cb6 commit be1d5a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions be/src/olap/delete_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,15 @@ 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;
}
} 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;
Expand Down

0 comments on commit be1d5a3

Please sign in to comment.