This is an automated email from the ASF dual-hosted git repository.

yma pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new 86ca8f7d5 fix (#6038)
86ca8f7d5 is described below

commit 86ca8f7d5879fb332f24bfea3cb0b1f3b9493d8c
Author: Rong Ma <[email protected]>
AuthorDate: Wed Jun 12 15:06:57 2024 +0800

    fix (#6038)
---
 .../org/apache/gluten/backendsapi/velox/VeloxListenerApi.scala   | 9 ++++-----
 cpp/velox/udf/Udaf.h                                             | 2 +-
 cpp/velox/udf/Udf.h                                              | 2 +-
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git 
a/backends-velox/src/main/scala/org/apache/gluten/backendsapi/velox/VeloxListenerApi.scala
 
b/backends-velox/src/main/scala/org/apache/gluten/backendsapi/velox/VeloxListenerApi.scala
index 0b1d131d3..0ad267d4c 100644
--- 
a/backends-velox/src/main/scala/org/apache/gluten/backendsapi/velox/VeloxListenerApi.scala
+++ 
b/backends-velox/src/main/scala/org/apache/gluten/backendsapi/velox/VeloxListenerApi.scala
@@ -47,15 +47,13 @@ class VeloxListenerApi extends ListenerApi {
         StaticSQLConf.SPARK_CACHE_SERIALIZER.key,
         "org.apache.spark.sql.execution.ColumnarCachedBatchSerializer")
     }
-    UDFResolver.resolveUdfConf(conf, isDriver = true)
-    initialize(conf)
+    initialize(conf, isDriver = true)
   }
 
   override def onDriverShutdown(): Unit = shutdown()
 
   override def onExecutorStart(pc: PluginContext): Unit = {
-    UDFResolver.resolveUdfConf(pc.conf(), isDriver = false)
-    initialize(pc.conf())
+    initialize(pc.conf(), isDriver = false)
   }
 
   override def onExecutorShutdown(): Unit = shutdown()
@@ -158,8 +156,9 @@ class VeloxListenerApi extends ListenerApi {
       .commit()
   }
 
-  private def initialize(conf: SparkConf): Unit = {
+  private def initialize(conf: SparkConf, isDriver: Boolean): Unit = {
     SparkDirectoryUtil.init(conf)
+    UDFResolver.resolveUdfConf(conf, isDriver = isDriver)
     val debugJni = conf.getBoolean(GlutenConfig.GLUTEN_DEBUG_MODE, 
defaultValue = false) &&
       conf.getBoolean(GlutenConfig.GLUTEN_DEBUG_KEEP_JNI_WORKSPACE, 
defaultValue = false)
     if (debugJni) {
diff --git a/cpp/velox/udf/Udaf.h b/cpp/velox/udf/Udaf.h
index 5b33e0611..2f292fbc6 100644
--- a/cpp/velox/udf/Udaf.h
+++ b/cpp/velox/udf/Udaf.h
@@ -23,7 +23,7 @@ struct UdafEntry {
   const char* name;
   const char* dataType;
 
-  size_t numArgs;
+  int numArgs;
   const char** argTypes;
 
   const char* intermediateType{nullptr};
diff --git a/cpp/velox/udf/Udf.h b/cpp/velox/udf/Udf.h
index 1fa3c54d5..a32bdaefe 100644
--- a/cpp/velox/udf/Udf.h
+++ b/cpp/velox/udf/Udf.h
@@ -23,7 +23,7 @@ struct UdfEntry {
   const char* name;
   const char* dataType;
 
-  size_t numArgs;
+  int numArgs;
   const char** argTypes;
 
   bool variableArity{false};


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to