| 66 | class 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, |
nothing calls this directly
no test coverage detected