This is an automated email from the ASF dual-hosted git repository.
zhangstar333 pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
new b81523fdc7f [cherry-pick](udf)fix java-udf memory leak (#25903)
b81523fdc7f is described below
commit b81523fdc7fee9fb86ac18bd816d6a05551add38
Author: zhangstar333 <[email protected]>
AuthorDate: Thu Oct 26 10:04:22 2023 +0800
[cherry-pick](udf)fix java-udf memory leak (#25903)
cherry-pick from master: #25151
---
be/src/vec/functions/function_java_udf.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/be/src/vec/functions/function_java_udf.cpp
b/be/src/vec/functions/function_java_udf.cpp
index d5e3751ef5f..14557af2045 100644
--- a/be/src/vec/functions/function_java_udf.cpp
+++ b/be/src/vec/functions/function_java_udf.cpp
@@ -49,6 +49,9 @@ JavaFunctionCall::JavaFunctionCall(const TFunction& fn, const
DataTypes& argumen
Status JavaFunctionCall::prepare(FunctionContext* context,
FunctionContext::FunctionStateScope scope) {
+ if (scope != FunctionContext::THREAD_LOCAL) {
+ return Status::OK();
+ }
JNIEnv* env = nullptr;
RETURN_IF_ERROR(JniUtil::GetJNIEnv(&env));
if (env == nullptr) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]