| 1171 | static constexpr bool kIsFileFormat = true; |
| 1172 | |
| 1173 | Status Init(const std::shared_ptr<Schema>& schema, const IpcWriteOptions& options, |
| 1174 | const std::shared_ptr<const KeyValueMetadata>& metadata = nullptr) { |
| 1175 | num_batches_written_ = 0; |
| 1176 | |
| 1177 | ARROW_ASSIGN_OR_RAISE(buffer_, AllocateResizableBuffer(0)); |
| 1178 | sink_.reset(new io::BufferOutputStream(buffer_)); |
| 1179 | ARROW_ASSIGN_OR_RAISE(writer_, |
| 1180 | MakeFileWriter(sink_.get(), schema, options, metadata)); |
| 1181 | return Status::OK(); |
| 1182 | } |
| 1183 | |
| 1184 | Status WriteBatch(const std::shared_ptr<RecordBatch>& batch, |
| 1185 | const std::shared_ptr<const KeyValueMetadata>& metadata = nullptr) { |
no test coverage detected