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

Function WriteRecordBatch

cpp/src/arrow/csv/generate_fuzz_corpus.cc:49–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47using ::arrow::json::ArrayFromJSONString;
48
49Result<std::shared_ptr<Buffer>> WriteRecordBatch(
50 const std::shared_ptr<RecordBatch>& batch, const WriteOptions& options) {
51 ARROW_ASSIGN_OR_RAISE(auto sink, io::BufferOutputStream::Create(1024));
52 ARROW_ASSIGN_OR_RAISE(auto writer, MakeCSVWriter(sink.get(), batch->schema(), options));
53 RETURN_NOT_OK(writer->WriteRecordBatch(*batch));
54 RETURN_NOT_OK(writer->Close());
55 return sink->Finish();
56}
57
58Result<std::shared_ptr<RecordBatch>> MakeBatch(
59 std::function<Result<std::shared_ptr<Array>>(int64_t length, double null_probability)>

Callers

nothing calls this directly

Calls 3

WriteRecordBatchMethod · 0.45
CloseMethod · 0.45
FinishMethod · 0.45

Tested by

no test coverage detected