csun5285 commented on code in PR #68133:
URL: https://github.com/apache/doris/pull/68133#discussion_r4037435928


##########
be/src/exprs/function/like.cpp:
##########
@@ -823,10 +824,8 @@ void FunctionLike::convert_like_pattern(const 
LikeSearchState* state, const std:
         }
     }
 
-    // add $ to pattern tail to match line tail
-    if (!pattern.empty() && re_pattern->back() != '*') {
-        re_pattern->append("$");
-    }
+    // `\z` is the end of the value in both Hyperscan and RE2
+    re_pattern->append("\\z");

Review Comment:
   a_b% compile as ^a.b



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to