yiguolei commented on code in PR #39381:
URL: https://github.com/apache/doris/pull/39381#discussion_r1718038180


##########
be/src/olap/delete_handler.cpp:
##########
@@ -312,38 +312,35 @@ Status DeleteHandler::parse_condition(const 
DeleteSubPredicatePB& sub_cond, TCon
 // value: matches "1597751948193618247  and length(source)<1;\n;\n"
 //
 // For more info, see DeleteHandler::construct_sub_predicates
-// FIXME(gavin): support unicode. And this is a tricky implementation, it 
should
-//               not be the final resolution, refactor it.
+// FIXME(gavin): This is a tricky implementation, it should not be the final 
resolution, refactor it.
 const char* const CONDITION_STR_PATTERN =
-    // .----------------- column-name ----------------.   
.----------------------- operator ------------------------.   .------------ 
value ----------.
-    
R"(([_a-zA-Z@0-9\s/][.a-zA-Z0-9_+-/?@#$%^&*"\s,:]*)\s*((?:=)|(?:!=)|(?:>>)|(?:<<)|(?:>=)|(?:<=)|(?:\*=)|(?:
 IS ))\s*('((?:[\s\S]+)?)'|(?:[\s\S]+)?))";
-    // '----------------- group 1 --------------------'   
'--------------------- group 2 ---------------------------'   | '-- group 4--'  
            |
-    //                                                         match any of: = 
!= >> << >= <= *= " IS "                 '----------- group 3 ---------'
-    //                                                                         
                                          match **ANY THING** without(4)
-    //                                                                         
                                          or with(3) single quote
-boost::regex DELETE_HANDLER_REGEX(CONDITION_STR_PATTERN);
+    // .----------------- column-name --------------------------.   
.----------------------- operator ------------------------.   .------------ 
value ----------.
+    
R"(([_a-zA-Z@0-9\s/\p{L}][.a-zA-Z0-9_+-/?@#$%^&*"\s,:\p{L}]*)\s*((?:=)|(?:!=)|(?:>>)|(?:<<)|(?:>=)|(?:<=)|(?:\*=)|(?:
 IS ))\s*('((?:[\s\S]+)?)'|(?:[\s\S]+)?))";
+    // '----------------- group 1 ------------------------------'   
'--------------------- group 2 ---------------------------'   | '-- group 4--'  
            |
+    //                                                                   match 
any of: = != >> << >= <= *= " IS "                 '----------- group 3 
---------'
+    //                                                                         
                                                    match **ANY THING** 
without(4)
+    //                                                                         
                                                    or with(3) single quote
 // clang-format on
+RE2 DELETE_HANDLER_REGEX(CONDITION_STR_PATTERN);

Review Comment:
   这种的都得加单侧,否则很难保证



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to