mrhhsg commented on code in PR #11631:
URL: https://github.com/apache/doris/pull/11631#discussion_r941930620


##########
be/src/olap/like_column_predicate.cpp:
##########
@@ -23,74 +23,131 @@
 
 namespace doris {
 
-LikeColumnPredicate::LikeColumnPredicate(bool opposite, uint32_t column_id,
-                                         doris_udf::FunctionContext* fn_ctx,
-                                         doris_udf::StringVal val)
+template <>
+LikeColumnPredicate<true>::LikeColumnPredicate(bool opposite, uint32_t 
column_id,
+                                               doris_udf::FunctionContext* 
fn_ctx,
+                                               doris_udf::StringVal val)
+        : ColumnPredicate(column_id, opposite),
+          _fn_ctx(fn_ctx),
+          pattern(reinterpret_cast<char*>(val.ptr), val.len) {
+    _state = reinterpret_cast<StateType*>(
+            
_fn_ctx->get_function_state(doris_udf::FunctionContext::THREAD_LOCAL));
+    _state->search_state.clone(_like_state);

Review Comment:
   Yes, every concurrent caller of the Hyperscan API should use a separate 
scratch. Here each LikeColumnPredicate only clones it once, so I think the 
overload is acceptable.



-- 
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