Skip to content

Commit

Permalink
Update again ReserveData(int64_t) method for BinaryBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
xuepanchen authored Jan 17, 2018
1 parent 9b5e805 commit 5a5593e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/src/arrow/builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<int32_t>::max()) {
if(value_data_length() + capacity > std::numeric_limits<int32_t>::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() {
Expand Down

0 comments on commit 5a5593e

Please sign in to comment.