MCPcopy Create free account
hub / github.com/apache/arrow / ValidateOverflow

Method ValidateOverflow

cpp/src/arrow/array/builder_binary.h:314–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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));

Callers

nothing calls this directly

Calls 4

memory_limitFunction · 0.85
CapacityErrorFunction · 0.85
OKFunction · 0.50
lengthMethod · 0.45

Tested by

no test coverage detected