diff --git a/cpp/src/arrow/compute/row/row_internal.cc b/cpp/src/arrow/compute/row/row_internal.cc index 469205e9b008d..43063daa3a0c2 100644 --- a/cpp/src/arrow/compute/row/row_internal.cc +++ b/cpp/src/arrow/compute/row/row_internal.cc @@ -297,10 +297,11 @@ Status RowTableImpl::ResizeOptionalVaryingLengthBuffer(int64_t num_extra_bytes) return Status::OK(); } - int64_t bytes_capacity_new = std::max(static_cast(1), 2 * bytes_capacity_); - while (bytes_capacity_new < num_bytes + num_extra_bytes) { - bytes_capacity_new *= 2; - } + // int64_t bytes_capacity_new = std::max(static_cast(1), 2 * bytes_capacity_); + // while (bytes_capacity_new < num_bytes + num_extra_bytes) { + // bytes_capacity_new *= 2; + // } + int64_t bytes_capacity_new = num_bytes + num_extra_bytes; RETURN_NOT_OK(rows_->Resize(size_rows_varying_length(bytes_capacity_new), false)); memset(rows_->mutable_data() + size_rows_varying_length(bytes_capacity_), 0,