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

Method WriteTable

cpp/src/arrow/csv/writer.cc:550–563  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

548 }
549
550 Status WriteTable(const Table& table, int64_t max_chunksize) override {
551 TableBatchReader reader(table);
552 reader.set_chunksize(max_chunksize > 0 ? max_chunksize : options_.batch_size);
553 std::shared_ptr<RecordBatch> batch;
554 RETURN_NOT_OK(reader.ReadNext(&batch));
555 while (batch != nullptr) {
556 RETURN_NOT_OK(TranslateMinimalBatch(*batch));
557 RETURN_NOT_OK(FlushToSink());
558 RETURN_NOT_OK(reader.ReadNext(&batch));
559 stats_.num_record_batches++;
560 }
561
562 return Status::OK();
563 }
564
565 Status Close() override { return Status::OK(); }
566

Callers 1

WriteCSVFunction · 0.45

Calls 3

set_chunksizeMethod · 0.80
OKFunction · 0.50
ReadNextMethod · 0.45

Tested by

no test coverage detected