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

Method Resize

cpp/src/arrow/array/builder_adaptive.cc:51–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51Status AdaptiveIntBuilderBase::Resize(int64_t capacity) {
52 RETURN_NOT_OK(CheckCapacity(capacity));
53 capacity = std::max(capacity, kMinBuilderCapacity);
54
55 int64_t nbytes = capacity * int_size_;
56 if (capacity_ == 0) {
57 ARROW_ASSIGN_OR_RAISE(data_, AllocateResizableBuffer(nbytes, pool_));
58 } else {
59 RETURN_NOT_OK(data_->Resize(nbytes));
60 }
61 raw_data_ = reinterpret_cast<uint8_t*>(data_->mutable_data());
62
63 return ArrayBuilder::Resize(capacity);
64}
65
66template <typename new_type, typename old_type>
67typename std::enable_if<sizeof(old_type) >= sizeof(new_type), Status>::type

Callers

nothing calls this directly

Calls 5

CheckCapacityFunction · 0.85
AllocateResizableBufferFunction · 0.85
ResizeFunction · 0.70
ARROW_ASSIGN_OR_RAISEFunction · 0.50
mutable_dataMethod · 0.45

Tested by

no test coverage detected