Skip to content

Commit

Permalink
Update cpp/src/arrow/compute/row/grouper.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
zanmato1984 authored Nov 1, 2024
1 parent 3f4d627 commit bf2aff0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/src/arrow/compute/row/grouper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -777,8 +777,8 @@ struct GrouperFastImpl : public Grouper {
} else {
ARROW_ASSIGN_OR_RAISE(fixedlen_bufs[i],
AllocatePaddedBuffer((num_groups + 1) * sizeof(uint32_t)));
// init offset[0] as 0, avoid when num_groups == 0
// fixedlen_bufs won't be initialized
// Set offset[0] to 0 so the later allocation of varlen_bufs doesn't see an
// uninitialized value when num_groups == 0.
reinterpret_cast<uint32_t*>(fixedlen_bufs[i]->mutable_data())[0] = 0;
}
cols_[i] =
Expand Down

0 comments on commit bf2aff0

Please sign in to comment.