Skip to content

Commit

Permalink
added todo explaining cost of creating Row object in python
Browse files Browse the repository at this point in the history
  • Loading branch information
ahirreddy committed Apr 15, 2014
1 parent 251f99d commit 906d180
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/pyspark/rdd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1419,6 +1419,9 @@ def registerAsTable(self, name):

def toPython(self):
jrdd = self._jschema_rdd.javaToPython()
# 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))

def _test():
Expand Down

0 comments on commit 906d180

Please sign in to comment.