Skip to content

Commit

Permalink
Adjust to cleaned up pyarrow FileReader API, support multiple record …
Browse files Browse the repository at this point in the history
…batches in a stream

closes apache#22
  • Loading branch information
wesm authored and BryanCutler committed Feb 23, 2017
1 parent fbe3b7c commit f44e6d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/pyspark/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ def dumps(self, obj):
raise NotImplementedError

def loads(self, obj):
from pyarrow.ipc import ArrowFileReader
reader = ArrowFileReader(obj)
return reader.get_record_batch(0)
from pyarrow import FileReader, BufferReader
reader = FileReader(BufferReader(obj))
return reader.read_all()

def __repr__(self):
return "ArrowSerializer"
Expand Down

0 comments on commit f44e6d7

Please sign in to comment.