Details
Description
We have been running into performance problems using Python UDFs with DataFrames at large scale.
From the implementation of BatchPythonEvaluation, it looks like the goal was to reuse the PythonRDD code. It caches the entire child RDD so that it can do two passes over the data. One to give to the PythonRDD, then one to join the python lambda results with the original row (which may have java objects that should be passed through).
In addition, it caches all the columns, even the ones that don't need to be processed by the Python UDF. In the cases I was working with, I had a 500 column table, and i wanted to use a python UDF for one column, and it ended up caching all 500 columns.
Attachments
Issue Links
- is duplicated by
-
SPARK-10685 Misaligned data with RDD.zip and DataFrame.withColumn after repartition
- Resolved
-
SPARK-10494 Multiple Python UDFs together with aggregation or sort merge join may cause OOM (failed to acquire memory)
- Resolved
- links to