zclllyybb commented on code in PR #30557:
URL: https://github.com/apache/doris/pull/30557#discussion_r1470731859
##########
be/src/vec/functions/like.cpp:
##########
@@ -447,43 +445,39 @@ void FunctionLike::convert_like_pattern(LikeSearchState*
state, const std::strin
}
// add ^ to pattern head to match line head
- if (pattern.size() > 0 && pattern[0] != '%') {
+ if (!pattern.empty() && pattern[0] != '%') {
re_pattern->append("^");
}
bool is_escaped = false;
Review Comment:
sure. we can have a TODO here. in fact there's many code could be improved
in future
--
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]