zhengruifeng commented on code in PR #49000:
URL: https://github.com/apache/spark/pull/49000#discussion_r1861713749


##########
python/pyspark/worker.py:
##########
@@ -171,9 +171,21 @@ def wrap_arrow_batch_udf(f, args_offsets, kwargs_offsets, 
return_type):
     elif type(return_type) == BinaryType:
         result_func = lambda r: bytes(r) if r is not None else r  # noqa: E731
 
-    @fail_on_stopiteration
-    def evaluate(*args: pd.Series) -> pd.Series:
-        return pd.Series([result_func(func(*row)) for row in zip(*args)])
+    if "spark.sql.execution.pythonUDF.arrow.concurrency.level" in runner_conf:
+        from concurrent.futures import ThreadPoolExecutor
+
+        c = 
int(runner_conf["spark.sql.execution.pythonUDF.arrow.concurrency.level"])

Review Comment:
   when `c == 1`, I guess we might fallback to the old path?



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

Reply via email to