| 102 | } |
| 103 | |
| 104 | void WriteSingleRunEnd(ArrayData* run_ends_data, int64_t run_end) { |
| 105 | DCHECK_GT(run_end, 0); |
| 106 | DCHECK(is_run_end_type(run_ends_data->type->id())); |
| 107 | auto* output_run_ends = run_ends_data->template GetMutableValues<uint8_t>(1); |
| 108 | switch (run_ends_data->type->id()) { |
| 109 | case Type::INT16: |
| 110 | *reinterpret_cast<int16_t*>(output_run_ends) = static_cast<int16_t>(run_end); |
| 111 | break; |
| 112 | case Type::INT32: |
| 113 | *reinterpret_cast<int32_t*>(output_run_ends) = static_cast<int32_t>(run_end); |
| 114 | break; |
| 115 | default: |
| 116 | DCHECK_EQ(run_ends_data->type->id(), Type::INT64); |
| 117 | *reinterpret_cast<int64_t*>(output_run_ends) = static_cast<int64_t>(run_end); |
| 118 | break; |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | Result<std::shared_ptr<ArrayData>> MakeNullREEArray( |
| 123 | const std::shared_ptr<DataType>& run_end_type, int64_t logical_length, |
no test coverage detected