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

Method ToRecordBatches

cpp/src/arrow/record_batch.cc:791–802  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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