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

Method CopyTo

cpp/src/arrow/record_batch.cc:479–489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

477} // namespace
478
479Result<std::shared_ptr<RecordBatch>> RecordBatch::CopyTo(
480 const std::shared_ptr<MemoryManager>& to) const {
481 ArrayVector copied_columns;
482 copied_columns.reserve(num_columns());
483 for (const auto& col : columns()) {
484 ARROW_ASSIGN_OR_RAISE(auto c, col->CopyTo(to));
485 copied_columns.push_back(std::move(c));
486 }
487
488 return Make(schema_, num_rows(), std::move(copied_columns));
489}
490
491Result<std::shared_ptr<RecordBatch>> RecordBatch::ViewOrCopyTo(
492 const std::shared_ptr<MemoryManager>& to) const {

Callers

nothing calls this directly

Calls 6

columnsFunction · 0.85
push_backMethod · 0.80
num_columnsFunction · 0.70
MakeFunction · 0.70
num_rowsFunction · 0.70
reserveMethod · 0.45

Tested by

no test coverage detected