| 49 | } |
| 50 | |
| 51 | Status AdaptiveIntBuilderBase::Resize(int64_t capacity) { |
| 52 | RETURN_NOT_OK(CheckCapacity(capacity)); |
| 53 | capacity = std::max(capacity, kMinBuilderCapacity); |
| 54 | |
| 55 | int64_t nbytes = capacity * int_size_; |
| 56 | if (capacity_ == 0) { |
| 57 | ARROW_ASSIGN_OR_RAISE(data_, AllocateResizableBuffer(nbytes, pool_)); |
| 58 | } else { |
| 59 | RETURN_NOT_OK(data_->Resize(nbytes)); |
| 60 | } |
| 61 | raw_data_ = reinterpret_cast<uint8_t*>(data_->mutable_data()); |
| 62 | |
| 63 | return ArrayBuilder::Resize(capacity); |
| 64 | } |
| 65 | |
| 66 | template <typename new_type, typename old_type> |
| 67 | typename std::enable_if<sizeof(old_type) >= sizeof(new_type), Status>::type |
nothing calls this directly
no test coverage detected