You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/08/10 13:22:57 UTC
[GitHub] [doris] starocean999 commented on a diff in pull request #11546: [Feature](nereids) Support neredis interface for new vectorized engine
starocean999 commented on code in PR #11546:
URL: https://github.com/apache/doris/pull/11546#discussion_r942445244
##########
be/src/vec/functions/like.cpp:
##########
@@ -117,15 +117,14 @@ Status FunctionLikeBase::regexp_fn(LikeSearchState* state, const StringValue& va
Status FunctionLikeBase::hs_prepare(FunctionContext* context, const char* expression,
hs_database_t** database, hs_scratch_t** scratch) {
hs_compile_error_t* compile_err;
-
- if (hs_compile(expression, HS_FLAG_DOTALL | HS_FLAG_ALLOWEMPTY, HS_MODE_BLOCK, NULL, database,
- &compile_err) != HS_SUCCESS) {
+ auto res = hs_compile(expression, HS_FLAG_DOTALL | HS_FLAG_ALLOWEMPTY, HS_MODE_BLOCK, NULL,
+ database, &compile_err);
+ if (res != HS_SUCCESS) {
*database = nullptr;
if (context) context->set_error("hs_compile regex pattern error");
- auto status = Status::RuntimeError("hs_compile regex pattern error:" +
- std::string(compile_err->message));
+ return Status::RuntimeError("hs_compile regex pattern error:" +
+ std::string(compile_err->message));
hs_free_compile_error(compile_err);
Review Comment:
call hs_free_compile_error(compile_err) before return xxx
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org