| 310 | } |
| 311 | |
| 312 | Status ValidateOverflow(int64_t new_bytes) { |
| 313 | auto new_size = value_data_builder_.length() + new_bytes; |
| 314 | if (ARROW_PREDICT_FALSE(new_size > memory_limit())) { |
| 315 | return Status::CapacityError("array cannot contain more than ", memory_limit(), |
| 316 | " bytes, have ", new_size); |
| 317 | } else { |
| 318 | return Status::OK(); |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | Status Resize(int64_t capacity) override { |
| 323 | ARROW_RETURN_NOT_OK(CheckCapacity(capacity)); |
nothing calls this directly
no test coverage detected