You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2017/04/30 17:39:47 UTC
arrow git commit: ARROW-910: [C++] Write 0 length at EOS in
StreamWriter
Repository: arrow
Updated Branches:
refs/heads/master 00994b820 -> d4a2a75a5
ARROW-910: [C++] Write 0 length at EOS in StreamWriter
Author: Wes McKinney <we...@twosigma.com>
Closes #614 from wesm/ARROW-910 and squashes the following commits:
e1ef336 [Wes McKinney] Write 0 length at EOS
Project: http://git-wip-us.apache.org/repos/asf/arrow/repo
Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/d4a2a75a
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/d4a2a75a
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/d4a2a75a
Branch: refs/heads/master
Commit: d4a2a75a50cb8ccaddb29bc5462ed3aa34af1d9f
Parents: 00994b8
Author: Wes McKinney <we...@twosigma.com>
Authored: Sun Apr 30 13:39:42 2017 -0400
Committer: Wes McKinney <we...@twosigma.com>
Committed: Sun Apr 30 13:39:42 2017 -0400
----------------------------------------------------------------------
cpp/src/arrow/ipc/writer.cc | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/arrow/blob/d4a2a75a/cpp/src/arrow/ipc/writer.cc
----------------------------------------------------------------------
diff --git a/cpp/src/arrow/ipc/writer.cc b/cpp/src/arrow/ipc/writer.cc
index 61caf64..78d6b9e 100644
--- a/cpp/src/arrow/ipc/writer.cc
+++ b/cpp/src/arrow/ipc/writer.cc
@@ -620,7 +620,11 @@ class StreamWriter::StreamWriterImpl {
virtual Status Close() {
// Write the schema if not already written
// User is responsible for closing the OutputStream
- return CheckStarted();
+ RETURN_NOT_OK(CheckStarted());
+
+ // Write 0 EOS message
+ const int32_t kEos = 0;
+ return Write(reinterpret_cast<const uint8_t*>(&kEos), sizeof(int32_t));
}
Status CheckStarted() {