Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/2920#discussion_r19714023
--- Diff: python/pyspark/rdd.py ---
@@ -449,12 +445,11 @@ def intersection(self, other):
def _reserialize(self, serializer=None):
serializer = serializer or self.ctx.serializer
- if self._jrdd_deserializer == serializer:
- return self
- else:
- converted = self.map(lambda x: x, preservesPartitioning=True)
- converted._jrdd_deserializer = serializer
- return converted
+ if self._jrdd_deserializer != serializer:
+ if not isinstance(self, PipelinedRDD):
+ self = self.map(lambda x: x, preservesPartitioning=True)
--- End diff --
We discussed this offline; this code is fine, since `self` is a local
variable here (it's just an idiom / pattern that I wasn't familiar with).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]