[WIP][SPARK-3517]mapPartitions is not correct clearing up the closure

commit 9d841bb is just a temporary solution,The problems should be in [ClosureCleaner](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/ClosureCleaner.scala)