From 5a5593e5305ec3f5475bc96f00e89902d83c9766 Mon Sep 17 00:00:00 2001 From: Panchen Xue Date: Wed, 17 Jan 2018 16:40:52 -0500 Subject: [PATCH] Update again ReserveData(int64_t) method for BinaryBuilder --- cpp/src/arrow/builder.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/src/arrow/builder.cc b/cpp/src/arrow/builder.cc index 65bad76d7c51a..a6be2e707a223 100644 --- a/cpp/src/arrow/builder.cc +++ b/cpp/src/arrow/builder.cc @@ -1227,11 +1227,11 @@ Status BinaryBuilder::Resize(int64_t capacity) { } Status BinaryBuilder::ReserveData(int64_t capacity) { - if(value_data_length.length() + capacity > std::numeric_limits::max()) { + if(value_data_length() + capacity > std::numeric_limits::max()) { return Status::Invalid("Cannot reserve capacity larger than 2^31 - 1 in length for binary data"); } - return value_data_builder_.Resize(value_data_length.length() + capacity); + return value_data_builder_.Resize(value_data_length() + capacity); } Status BinaryBuilder::AppendNextOffset() {