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

Method Write

cpp/src/arrow/dataset/file_csv_test.cc:47–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45 public:
46 using FormatType = CsvFileFormat;
47 static Result<std::shared_ptr<Buffer>> Write(RecordBatchReader* reader) {
48 ARROW_ASSIGN_OR_RAISE(auto sink, io::BufferOutputStream::Create());
49 ARROW_ASSIGN_OR_RAISE(auto table, reader->ToTable());
50 auto options = csv::WriteOptions::Defaults();
51 RETURN_NOT_OK(csv::WriteCSV(*table, options, sink.get()));
52 return sink->Finish();
53 }
54
55 static std::shared_ptr<CsvFileFormat> MakeFormat() {
56 auto format = std::make_shared<CsvFileFormat>();

Callers 2

GetFileSourceMethod · 0.45
TEST_PFunction · 0.45

Calls 4

WriteCSVFunction · 0.85
DefaultsFunction · 0.50
getMethod · 0.45
FinishMethod · 0.45

Tested by

no test coverage detected