liuneng1994 commented on PR #8713:
URL:
https://github.com/apache/incubator-gluten/pull/8713#issuecomment-2652498886
> Do we still need to call `local_engine::SparkConfigs::updateConfig` in
`Java_org_apache_gluten_vectorized_ExpressionEvaluatorJniWrapper_nativeCreateKernelWithIterator`
?
>
> ```c++
> JNIEXPORT jlong
Java_org_apache_gluten_vectorized_ExpressionEvaluatorJniWrapper_nativeCreateKernelWithIterator(
> JNIEnv * env,
> jclass,
> jbyteArray plan,
> jobjectArray split_infos,
> jobjectArray iter_arr,
> jbyteArray conf_plan,
> jboolean materialize_input)
> {
> LOCAL_ENGINE_JNI_METHOD_START
> auto query_context =
local_engine::QueryContext::instance().currentQueryContext();
>
> // by task update new configs ( in case of dynamic config update )
> const auto conf_plan_a = local_engine::getByteArrayElementsSafe(env,
conf_plan);
> const std::string::size_type conf_plan_size = conf_plan_a.length();
> local_engine::SparkConfigs::updateConfig(query_context,
{reinterpret_cast<const char *>(conf_plan_a.elems()), conf_plan_size});
>
> const auto plan_a = local_engine::getByteArrayElementsSafe(env, plan);
> const std::string::size_type plan_size = plan_a.length();
> auto plan_pb =
local_engine::BinaryToMessage<substrait::Plan>({reinterpret_cast<const char
*>(plan_a.elems()), plan_size});
>
> auto parser_context =
local_engine::ParserContext::build(query_context, plan_pb);
> local_engine::SerializedPlanParser parser(parser_context);
>
> jsize iter_num = env->GetArrayLength(iter_arr);
> for (jsize i = 0; i < iter_num; i++)
> {
> jobject iter = env->GetObjectArrayElement(iter_arr, i);
> iter = env->NewGlobalRef(iter);
> parser.addInputIter(iter, materialize_input);
> }
> ```
It seems that it is no longer needed. The creation of ThreadGroup is before
the creation of batch iterator.
--
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]