ARROW-5395: Utilize stream EOS in File format

This commit is contained in:
John Muehlhausen committed 2019-05-22 12:09:15 -05:00
1 parent 1c4d4333ec
commit 901dfeab02
2 files changed
+6 -1

No files matched your search

+5
View File
@@ -1076,6 +1076,11 @@ class PayloadFileWriter : public internal::IpcPayloadWriter, protected StreamBoo
}
Status Close() override {
// Close stream for compatibility with sequential readers
RETURN_NOT_OK(UpdatePosition());
int32_t end_of_stream_marker = 0;
RETURN_NOT_OK(Write(&end_of_stream_marker, sizeof(int32_t)));
// Write file footer
RETURN_NOT_OK(UpdatePosition());
int64_t initial_position = position_;
+1 -1
View File
@@ -104,7 +104,7 @@ Schematically we have: ::
<magic number "ARROW1">
<empty padding bytes [to 8 byte boundary]>
<STREAMING FORMAT>
<STREAMING FORMAT with EOS>
<FOOTER>
<FOOTER SIZE: int32>
<magic number "ARROW1">