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

Method Resize

cpp/src/arrow/array/builder_nested.h:71–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69 ~VarLengthListLikeBuilder() override = default;
70
71 Status Resize(int64_t capacity) override {
72 if (ARROW_PREDICT_FALSE(capacity > maximum_elements())) {
73 return Status::CapacityError(type_name(),
74 " array cannot reserve space for more than ",
75 maximum_elements(), " got ", capacity);
76 }
77 ARROW_RETURN_NOT_OK(CheckCapacity(capacity));
78
79 // One more than requested for list offsets
80 const int64_t offsets_capacity =
81 is_list_view(TYPE::type_id) ? capacity : capacity + 1;
82 ARROW_RETURN_NOT_OK(offsets_builder_.Resize(offsets_capacity));
83 return ArrayBuilder::Resize(capacity);
84 }
85
86 void Reset() override {
87 ArrayBuilder::Reset();

Callers

nothing calls this directly

Calls 7

maximum_elementsFunction · 0.85
CapacityErrorFunction · 0.85
CheckCapacityFunction · 0.85
ResizeFunction · 0.70
type_nameFunction · 0.50
is_list_viewFunction · 0.50
ResizeMethod · 0.45

Tested by

no test coverage detected