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

Function ValidateOverflow

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

Source from the content-addressed store, hash-verified

819 }
820
821 Status ValidateOverflow(int64_t new_bytes) const {
822 auto new_size = byte_builder_.length() + new_bytes;
823 if (ARROW_PREDICT_FALSE(new_size > memory_limit())) {
824 return Status::CapacityError("array cannot contain more than ", memory_limit(),
825 " bytes, have ", new_size);
826 } else {
827 return Status::OK();
828 }
829 }
830
831 /// \brief Ensures there is enough allocated capacity to append the indicated
832 /// 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