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 #22
  • Loading branch information
wesm authored and BryanCutler committed Jan 31, 2017
1 parent d82ae60 commit b35192c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/pyspark/serializers.py
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 b35192c

Please sign in to comment.