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

Method SimpleRecordBatch

cpp/src/arrow/record_batch.cc:68–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66class SimpleRecordBatch : public RecordBatch {
67 public:
68 SimpleRecordBatch(std::shared_ptr<Schema> schema, int64_t num_rows,
69 std::vector<std::shared_ptr<Array>> columns,
70 std::shared_ptr<Device::SyncEvent> sync_event = nullptr)
71 : RecordBatch(std::move(schema), num_rows),
72 boxed_columns_(std::move(columns)),
73 device_type_(DeviceAllocationType::kCPU),
74 sync_event_(std::move(sync_event)) {
75 if (boxed_columns_.size() > 0) {
76 device_type_ = boxed_columns_[0]->device_type();
77 }
78
79 columns_.resize(boxed_columns_.size());
80 for (size_t i = 0; i < columns_.size(); ++i) {
81 columns_[i] = boxed_columns_[i]->data();
82 DCHECK_EQ(device_type_, columns_[i]->device_type());
83 }
84 }
85
86 SimpleRecordBatch(std::shared_ptr<Schema> schema, int64_t num_rows,
87 std::vector<std::shared_ptr<ArrayData>> columns,

Callers

nothing calls this directly

Calls 5

resizeMethod · 0.80
sizeMethod · 0.45
device_typeMethod · 0.45
dataMethod · 0.45
num_fieldsMethod · 0.45

Tested by

no test coverage detected