MCPcopy Create free account
hub / github.com/apache/arrow / OpenRecordBatchWriter

Function OpenRecordBatchWriter

cpp/src/arrow/ipc/writer.cc:1573–1585  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1571namespace internal {
1572
1573Result<std::unique_ptr<RecordBatchWriter>> OpenRecordBatchWriter(
1574 std::unique_ptr<IpcPayloadWriter> sink, const std::shared_ptr<Schema>& schema,
1575 const IpcWriteOptions& options) {
1576 // constructor for IpcFormatWriter here dereferences ptr to schema.
1577 if (schema == nullptr) {
1578 return Status::Invalid("nullptr for Schema not allowed");
1579 }
1580 auto writer = std::make_unique<internal::IpcFormatWriter>(
1581 std::move(sink), schema, options, /*is_file_format=*/false);
1582 RETURN_NOT_OK(writer->Start());
1583 // R build with openSUSE155 requires an explicit unique_ptr construction
1584 return std::unique_ptr<RecordBatchWriter>(std::move(writer));
1585}
1586
1587Result<std::unique_ptr<IpcPayloadWriter>> MakePayloadStreamWriter(
1588 io::OutputStream* sink, const IpcWriteOptions& options) {

Callers 3

BeginMethod · 0.85
InitializeWriterMethod · 0.85
BeginMethod · 0.85

Calls 2

InvalidFunction · 0.50
StartMethod · 0.45

Tested by

no test coverage detected