BryanCutler commented on a change in pull request #22305:
[SPARK-24561][SQL][Python] User-defined window aggregation functions with
Pandas UDF (bounded window)
URL: https://github.com/apache/spark/pull/22305#discussion_r241222935
##########
File path: python/pyspark/worker.py
##########
@@ -238,7 +284,8 @@ def read_udfs(pickleSer, infile, eval_type):
# In the special case of a single UDF this will return a single result
rather
# than a tuple of results; this is the format that the JVM side
expects.
for i in range(num_udfs):
- arg_offsets, udf = read_single_udf(pickleSer, infile, eval_type,
runner_conf)
+ arg_offsets, udf = read_single_udf(
+ pickleSer, infile, eval_type, runner_conf, udf_index=i)
Review comment:
So right now, since only window udfs can be sent together the mapping of
`udf_index` -> `window_bound_type` should hold right? It is a little fragile
though and cause problems if that ever changed in the future. Instead of
indexing the udfs, what do you think about popping `window_bound_type` values
from the `runner_conf` list?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]