You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Related to #1097, there are some instances in the code where the closure passed to mapPartitions is referencing members of the outer class, causing the entire class to be serialized. In many cases the class is a SparkPlan instance, causing most of the query plan objects to be serialized to the task unnecessarily.
Steps/Code to reproduce bug
Examine the source for code calling mapPartitions and the closure referencing class constructor arguments or fields/methods of the instance.
Expected behavior
Values needed in the closure should be cached in a local val just before the mapPartitions call to avoid the need to serialize the entire outer object.
The text was updated successfully, but these errors were encountered:
jlowe
changed the title
[BUG] Excessive serialization due to class member access in mapPartitions closure
[BUG] Excessive serialization due to member access in mapPartitions closure
Nov 11, 2020
We might be able to temporarily add something unserializable to GpuExec and run the unit tests to catch places where we are excessively serializing the entire plan when we shouldn't be.
Describe the bug
Related to #1097, there are some instances in the code where the closure passed to
mapPartitions
is referencing members of the outer class, causing the entire class to be serialized. In many cases the class is aSparkPlan
instance, causing most of the query plan objects to be serialized to the task unnecessarily.Steps/Code to reproduce bug
Examine the source for code calling
mapPartitions
and the closure referencing class constructor arguments or fields/methods of the instance.Expected behavior
Values needed in the closure should be cached in a local
val
just before themapPartitions
call to avoid the need to serialize the entire outer object.The text was updated successfully, but these errors were encountered: