You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/09/01 01:19:40 UTC

[GitHub] [arrow] kou commented on a change in pull request #8084: ARROW-9874: [C++] Add sink-owning version of IPC writers

kou commented on a change in pull request #8084:
URL: https://github.com/apache/arrow/pull/8084#discussion_r480540506



##########
File path: cpp/src/arrow/ipc/read_write_test.cc
##########
@@ -968,7 +969,7 @@ struct StreamWriterHelper {
   Status Init(const std::shared_ptr<Schema>& schema, const IpcWriteOptions& options) {
     ARROW_ASSIGN_OR_RAISE(buffer_, AllocateResizableBuffer(0));
     sink_.reset(new io::BufferOutputStream(buffer_));
-    ARROW_ASSIGN_OR_RAISE(writer_, NewStreamWriter(sink_.get(), schema, options));
+    ARROW_ASSIGN_OR_RAISE(writer_, MakeStreamWriter(sink_.get(), schema, options));

Review comment:
       ```suggestion
       ARROW_ASSIGN_OR_RAISE(writer_, MakeStreamWriter(sink_, schema, options));
   ```

##########
File path: cpp/examples/minimal_build/example.cc
##########
@@ -52,8 +52,8 @@ Status RunMain(int argc, char** argv) {
   ARROW_ASSIGN_OR_RAISE(auto output_file,
                         arrow::io::FileOutputStream::Open(arrow_filename));
   ARROW_ASSIGN_OR_RAISE(auto batch_writer,
-                        arrow::ipc::NewFileWriter(output_file.get(),
-                                                  table->schema()));
+                        arrow::ipc::MakeFileWriter(output_file.get(),

Review comment:
       ```suggestion
                           arrow::ipc::MakeFileWriter(output_file,
   ```

##########
File path: cpp/src/arrow/ipc/read_write_test.cc
##########
@@ -903,7 +903,8 @@ struct FileWriterHelper {
 
     ARROW_ASSIGN_OR_RAISE(buffer_, AllocateResizableBuffer(0));
     sink_.reset(new io::BufferOutputStream(buffer_));
-    ARROW_ASSIGN_OR_RAISE(writer_, NewFileWriter(sink_.get(), schema, options, metadata));
+    ARROW_ASSIGN_OR_RAISE(writer_,
+                          MakeFileWriter(sink_.get(), schema, options, metadata));

Review comment:
       ```suggestion
                             MakeFileWriter(sink_, schema, options, metadata));
   ```

##########
File path: cpp/src/arrow/ipc/writer.cc
##########
@@ -1042,8 +1042,13 @@ class ARROW_EXPORT IpcFormatWriter : public RecordBatchWriter {
 
 class StreamBookKeeper {
  public:
-  explicit StreamBookKeeper(const IpcWriteOptions& options, io::OutputStream* sink)
+  StreamBookKeeper(const IpcWriteOptions& options, io::OutputStream* sink)
       : options_(options), sink_(sink), position_(-1) {}

Review comment:
       Do we need `owned_sink_(nullptr)` here?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org