From 5ebfb320cde650158e770ef3976f203facd538e0 Mon Sep 17 00:00:00 2001 From: Panchen Xue Date: Tue, 16 Jan 2018 16:40:22 -0500 Subject: [PATCH] Add capacity() method for TypedBufferBuilder --- cpp/src/arrow/buffer.h | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/src/arrow/buffer.h b/cpp/src/arrow/buffer.h index 450a4c78b5bbb..11cbea0802cef 100644 --- a/cpp/src/arrow/buffer.h +++ b/cpp/src/arrow/buffer.h @@ -314,6 +314,7 @@ class ARROW_EXPORT TypedBufferBuilder : public BufferBuilder { const T* data() const { return reinterpret_cast(data_); } int64_t length() const { return size_ / sizeof(T); } + int64_t capacity() const { return capacity_ / sizeof(T); } }; /// \brief Allocate a fixed size mutable buffer from a memory pool