Skip to content

Commit

Permalink
Temp reduce resize
Browse files Browse the repository at this point in the history
  • Loading branch information
zanmato1984 committed Jul 2, 2024
1 parent 342a91d commit 8619d9e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cpp/src/arrow/compute/row/row_internal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,11 @@ Status RowTableImpl::ResizeOptionalVaryingLengthBuffer(int64_t num_extra_bytes)
return Status::OK();
}

int64_t bytes_capacity_new = std::max(static_cast<int64_t>(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<int64_t>(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,
Expand Down

0 comments on commit 8619d9e

Please sign in to comment.