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

Method TrimBuffer

cpp/src/arrow/array/builder_base.cc:55–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55Status ArrayBuilder::TrimBuffer(const int64_t bytes_filled, ResizableBuffer* buffer) {
56 if (buffer) {
57 if (bytes_filled < buffer->size()) {
58 // Trim buffer
59 RETURN_NOT_OK(buffer->Resize(bytes_filled));
60 }
61 // zero the padding
62 buffer->ZeroPadding();
63 } else {
64 // Null buffers are allowed in place of 0-byte buffers
65 DCHECK_EQ(bytes_filled, 0);
66 }
67 return Status::OK();
68}
69
70Status ArrayBuilder::AppendToBitmap(bool is_valid) {
71 RETURN_NOT_OK(Reserve(1));

Callers

nothing calls this directly

Calls 3

OKFunction · 0.50
sizeMethod · 0.45
ResizeMethod · 0.45

Tested by

no test coverage detected