| 120 | } |
| 121 | |
| 122 | Result<std::shared_ptr<ArrayData>> MakeNullREEArray( |
| 123 | const std::shared_ptr<DataType>& run_end_type, int64_t logical_length, |
| 124 | MemoryPool* pool) { |
| 125 | auto ree_type = std::make_shared<RunEndEncodedType>(run_end_type, null()); |
| 126 | const int64_t physical_length = logical_length > 0 ? 1 : 0; |
| 127 | ARROW_ASSIGN_OR_RAISE(auto run_ends_data, |
| 128 | PreallocateRunEndsArray(run_end_type, physical_length, pool)); |
| 129 | if (logical_length > 0) { |
| 130 | WriteSingleRunEnd(run_ends_data.get(), logical_length); |
| 131 | } |
| 132 | auto values_data = ArrayData::Make(null(), physical_length, {NULLPTR}, |
| 133 | /*null_count=*/physical_length); |
| 134 | return ArrayData::Make(std::move(ree_type), logical_length, {NULLPTR}, |
| 135 | {std::move(run_ends_data), std::move(values_data)}, |
| 136 | /*null_count=*/0); |
| 137 | } |
| 138 | |
| 139 | } // namespace ree_util |
| 140 | } // namespace internal |
nothing calls this directly
no test coverage detected