| 47 | } |
| 48 | |
| 49 | Result<std::shared_ptr<ArrayData>> PreallocateRunEndsArray( |
| 50 | const std::shared_ptr<DataType>& run_end_type, int64_t physical_length, |
| 51 | MemoryPool* pool) { |
| 52 | DCHECK(is_run_end_type(run_end_type->id())); |
| 53 | ARROW_ASSIGN_OR_RAISE( |
| 54 | auto run_ends_buffer, |
| 55 | AllocateBuffer(physical_length * run_end_type->byte_width(), pool)); |
| 56 | return ArrayData::Make(run_end_type, physical_length, |
| 57 | {NULLPTR, std::move(run_ends_buffer)}, /*null_count=*/0); |
| 58 | } |
| 59 | |
| 60 | Result<std::shared_ptr<ArrayData>> PreallocateValuesArray( |
| 61 | const std::shared_ptr<DataType>& value_type, bool has_validity_buffer, int64_t length, |
nothing calls this directly
no test coverage detected