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

Method Write

cpp/src/arrow/dataset/file_orc_test.cc:41–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39 public:
40 using FormatType = OrcFileFormat;
41 static Result<std::shared_ptr<Buffer>> Write(RecordBatchReader* reader) {
42 ARROW_ASSIGN_OR_RAISE(auto sink, io::BufferOutputStream::Create());
43 ARROW_ASSIGN_OR_RAISE(auto writer, adapters::orc::ORCFileWriter::Open(sink.get()));
44 ARROW_ASSIGN_OR_RAISE(auto table, reader->ToTable());
45 RETURN_NOT_OK(writer->Write(*table));
46 RETURN_NOT_OK(writer->Close());
47 return sink->Finish();
48 }
49
50 static std::shared_ptr<OrcFileFormat> MakeFormat() {
51 return std::make_shared<OrcFileFormat>();

Callers

nothing calls this directly

Calls 2

CloseMethod · 0.45
FinishMethod · 0.45

Tested by

no test coverage detected