| 42 | } |
| 43 | |
| 44 | Result<std::shared_ptr<RunEndEncodedArray>> RunEndEncodedArray::Make( |
| 45 | const std::shared_ptr<DataType>& type, int64_t logical_length, |
| 46 | const std::shared_ptr<Array>& run_ends, const std::shared_ptr<Array>& values, |
| 47 | int64_t logical_offset) { |
| 48 | if (type->id() != Type::RUN_END_ENCODED) { |
| 49 | return Status::Invalid("Type must be RUN_END_ENCODED"); |
| 50 | } |
| 51 | const auto* ree_type = internal::checked_cast<const RunEndEncodedType*>(type.get()); |
| 52 | RETURN_NOT_OK(ree_util::ValidateRunEndEncodedChildren( |
| 53 | *ree_type, logical_length, run_ends->data(), values->data(), 0, logical_offset)); |
| 54 | return std::make_shared<RunEndEncodedArray>(type, logical_length, run_ends, values, |
| 55 | logical_offset); |
| 56 | } |
| 57 | |
| 58 | Result<std::shared_ptr<RunEndEncodedArray>> RunEndEncodedArray::Make( |
| 59 | int64_t logical_length, const std::shared_ptr<Array>& run_ends, |
nothing calls this directly
no test coverage detected