Github user kanzhang commented on a diff in the pull request:
https://github.com/apache/spark/pull/1023#discussion_r13572383
--- Diff: python/pyspark/sql.py ---
@@ -346,7 +347,7 @@ def _toPython(self):
# TODO: This is inefficient, we should construct the Python Row
object
# in Java land in the javaToPython function. May require a custom
# pickle serializer in Pyrolite
- return RDD(jrdd, self._sc, self._sc.serializer).map(lambda d:
Row(d))
+ return RDD(jrdd, self._sc, PickleSerializer()).map(lambda d:
Row(d))
--- End diff --
@ahirreddy , you are right; batching is currently not implemented in
```javaToPython``` method. We could change it to
```BatchedSerializer(PickleSerialzier())``` later when batching is supported.
Also, ```javaToPython``` only serializes to Pickle format for now, while
```_sc.serializer``` could potentially be set to some other serializers (like
```MarshalSerializer```) when user creates ```_sc```.
---
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.
---