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

Function Finish

cpp/src/arrow/buffer_builder.h:165–174  ·  view source on GitHub ↗

\brief Return result of builder as a Buffer object. The builder is reset and can be reused afterwards. \param[out] out the finalized Buffer object \param shrink_to_fit if the buffer size is smaller than its capacity, reallocate to fit more tightly in memory. Set to false to avoid a reallocation, at the expense of potentially more memory consumption. \return Status

Source from the content-addressed store, hash-verified

163 /// a reallocation, at the expense of potentially more memory consumption.
164 /// \return Status
165 Status Finish(std::shared_ptr<Buffer>* out, bool shrink_to_fit = true) {
166 ARROW_RETURN_NOT_OK(Resize(size_, shrink_to_fit));
167 if (size_ != 0) buffer_->ZeroPadding();
168 *out = buffer_;
169 if (*out == NULLPTR) {
170 ARROW_ASSIGN_OR_RAISE(*out, AllocateBuffer(0, alignment_, pool_));
171 }
172 Reset();
173 return Status::OK();
174 }
175
176 Result<std::shared_ptr<Buffer>> Finish(bool shrink_to_fit = true) {
177 std::shared_ptr<Buffer> out;

Callers 3

FinishWithLengthFunction · 0.70
FinishMethod · 0.70
FinishMethod · 0.70

Calls 5

ResizeFunction · 0.70
AllocateBufferFunction · 0.70
ResetFunction · 0.70
OKFunction · 0.70
ARROW_ASSIGN_OR_RAISEFunction · 0.50

Tested by

no test coverage detected