bkietz commented on code in PR #36418:
URL: https://github.com/apache/arrow/pull/36418#discussion_r1254924510
##########
cpp/src/arrow/compute/kernels/hash_aggregate.cc:
##########
@@ -2464,9 +2464,9 @@ struct GroupedCountDistinctImpl : public
GroupedAggregator {
ARROW_ASSIGN_OR_RAISE(std::shared_ptr<Buffer> remapped_g,
AllocateBuffer(uniques.length * sizeof(uint32_t),
pool_));
- const auto* g_mapping = group_id_mapping.GetValues<uint32_t>(1);
- const auto* other_g = uniques[1].array()->GetValues<uint32_t>(1);
- auto* g = reinterpret_cast<uint32_t*>(remapped_g->mutable_data());
+ const auto* g_mapping = group_id_mapping.buffers[1]->data_as<uint32_t>();
+ const auto* other_g = uniques[1].array()->buffers[1]->data_as<uint32_t>();
Review Comment:
... IMHO it looks more natural/prettier to specify which buffer before
describing what you're going to do with the buffer.
It's not one-to-one either since GetValues accounts for the offset. I've
reverted replacements of GetValues.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]