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

Method Emplace

cpp/src/arrow/dataset/scanner.cc:672–683  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

670 std::vector<RecordBatchVector> batches{};
671
672 void Emplace(const EnumeratedRecordBatch& batch) {
673 std::lock_guard<std::mutex> lock(mutex);
674 auto fragment_index = batch.fragment.index;
675 auto batch_index = batch.record_batch.index;
676 if (static_cast<int>(batches.size()) <= fragment_index) {
677 batches.resize(fragment_index + 1);
678 }
679 if (static_cast<int>(batches[fragment_index].size()) <= batch_index) {
680 batches[fragment_index].resize(batch_index + 1);
681 }
682 batches[fragment_index][batch_index] = batch.record_batch.value;
683 }
684
685 RecordBatchVector Finish() {
686 RecordBatchVector all_batches;

Callers 2

ToTableAsyncMethod · 0.45
ProcessInnerMethod · 0.45

Calls 2

resizeMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected