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

Method ToRecordBatches

cpp/src/arrow/record_batch.cc:790–801  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

788// Base record batch reader
789
790Result<RecordBatchVector> RecordBatchReader::ToRecordBatches() {
791 RecordBatchVector batches;
792 while (true) {
793 std::shared_ptr<RecordBatch> batch;
794 RETURN_NOT_OK(ReadNext(&batch));
795 if (!batch) {
796 break;
797 }
798 batches.emplace_back(std::move(batch));
799 }
800 return batches;
801}
802
803Result<std::shared_ptr<Table>> RecordBatchReader::ToTable() {
804 ARROW_ASSIGN_OR_RAISE(auto batches, ToRecordBatches());

Callers

nothing calls this directly

Calls 2

ReadNextFunction · 0.85
emplace_backMethod · 0.80

Tested by

no test coverage detected