| 452 | : pool_(pool), type_(type), length_(length) {} |
| 453 | |
| 454 | Status CreateBuffer() { |
| 455 | if (type_->id() == Type::RUN_END_ENCODED) { |
| 456 | buffer_ = NULLPTR; |
| 457 | return Status::OK(); |
| 458 | } |
| 459 | ARROW_ASSIGN_OR_RAISE(int64_t buffer_length, |
| 460 | GetBufferLength(type_, length_).Finish()); |
| 461 | ARROW_ASSIGN_OR_RAISE(buffer_, AllocateBuffer(buffer_length, pool_)); |
| 462 | std::memset(buffer_->mutable_data(), 0, buffer_->size()); |
| 463 | return Status::OK(); |
| 464 | } |
| 465 | |
| 466 | Result<std::shared_ptr<ArrayData>> Create() { |
| 467 | if (buffer_ == nullptr) { |
nothing calls this directly
no test coverage detected