[
https://issues.apache.org/jira/browse/ARROW-3894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16701913#comment-16701913
]
Rik Coenders commented on ARROW-3894:
-------------------------------------
To reproduce:
{code}
import pyarrow
import tempfile
schema = pyarrow.schema([('field', pyarrow.int64())])
filename = tempfile.mkstemp()[1]
with pyarrow.OSFile(filename, 'w') as file:
writer = pyarrow.RecordBatchFileWriter(file, schema)
writer.close()
with pyarrow.OSFile(filename, 'r') as file:
reader = pyarrow.RecordBatchFileReader(file)
reader.read_all(){code}
> [Python] Error reading IPC file with no record batches
> ------------------------------------------------------
>
> Key: ARROW-3894
> URL: https://issues.apache.org/jira/browse/ARROW-3894
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++, Python
> Affects Versions: 0.11.1
> Reporter: Rik Coenders
> Priority: Major
> Fix For: 0.12.0
>
>
> When using the RecordBatchFileWriter without actually writing a record batch.
> The magic byte at the beginning of the file is not written. This causes the
> exception File is smaller than indicated metadata size when reading that file
> with the RecordBatchFileReader.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)