| 53 | } |
| 54 | |
| 55 | std::shared_ptr<Array> ExtensionType::WrapArray(const std::shared_ptr<DataType>& type, |
| 56 | const std::shared_ptr<Array>& storage) { |
| 57 | DCHECK_EQ(type->id(), Type::EXTENSION); |
| 58 | const auto& ext_type = checked_cast<const ExtensionType&>(*type); |
| 59 | DCHECK_EQ(storage->type_id(), ext_type.storage_type()->id()); |
| 60 | auto data = storage->data()->Copy(); |
| 61 | data->type = type; |
| 62 | return ext_type.MakeArray(std::move(data)); |
| 63 | } |
| 64 | |
| 65 | std::shared_ptr<ChunkedArray> ExtensionType::WrapArray( |
| 66 | const std::shared_ptr<DataType>& type, const std::shared_ptr<ChunkedArray>& storage) { |
no test coverage detected