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

Function WriteRecordBatchStream

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

Source from the content-addressed store, hash-verified

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

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