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