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

Function WriteRecordBatchStream

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

Source from the content-addressed store, hash-verified

853}
854
855Status WriteRecordBatchStream(const std::vector<std::shared_ptr<RecordBatch>>& batches,
856 const IpcWriteOptions& options, io::OutputStream* dst) {
857 ARROW_ASSIGN_OR_RAISE(std::shared_ptr<RecordBatchWriter> writer,
858 MakeStreamWriter(dst, batches[0]->schema(), options));
859 for (const auto& batch : batches) {
860 DCHECK(batch->schema()->Equals(*batches[0]->schema())) << "Schemas unequal";
861 RETURN_NOT_OK(writer->WriteRecordBatch(*batch));
862 }
863 RETURN_NOT_OK(writer->Close());
864 return Status::OK();
865}
866
867namespace {
868

Callers 4

TEST_FFunction · 0.85
RoundtripBatchFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85

Calls 7

MakeStreamWriterFunction · 0.85
ARROW_ASSIGN_OR_RAISEFunction · 0.70
OKFunction · 0.50
schemaMethod · 0.45
EqualsMethod · 0.45
WriteRecordBatchMethod · 0.45
CloseMethod · 0.45

Tested by 4

TEST_FFunction · 0.68
RoundtripBatchFunction · 0.68
TESTFunction · 0.68
TESTFunction · 0.68