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

Method ValidateOverflow

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

Source from the content-addressed store, hash-verified

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

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