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

Function ValidateOverflow

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

Source from the content-addressed store, hash-verified

821 }
822
823 Status ValidateOverflow(int64_t new_bytes) const {
824 auto new_size = byte_builder_.length() + new_bytes;
825 if (ARROW_PREDICT_FALSE(new_size > memory_limit())) {
826 return Status::CapacityError("array cannot contain more than ", memory_limit(),
827 " bytes, have ", new_size);
828 } else {
829 return Status::OK();
830 }
831 }
832
833 /// \brief Ensures there is enough allocated capacity to append the indicated
834 /// number of bytes to the value data buffer without additional allocations

Callers 4

AppendMethod · 0.70
ExtendCurrentMethod · 0.70
ReserveDataMethod · 0.70
ReserveDataFunction · 0.70

Calls 4

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

Tested by

no test coverage detected