pitrou commented on code in PR #45515:
URL: https://github.com/apache/arrow/pull/45515#discussion_r1954681877
##########
cpp/src/arrow/compute/key_map_internal.h:
##########
@@ -81,31 +81,70 @@ class ARROW_EXPORT SwissTable {
void num_inserted(uint32_t i) { num_inserted_ = i; }
- uint8_t* blocks() const { return blocks_->mutable_data(); }
-
uint32_t* hashes() const {
return reinterpret_cast<uint32_t*>(hashes_->mutable_data());
}
/// \brief Extract group id for a given slot in a given block.
///
- inline uint64_t extract_group_id(const uint8_t* block_ptr, int slot,
- uint64_t group_id_mask) const;
+ static uint32_t extract_group_id(const uint8_t* block_ptr, int local_slot,
+ int num_group_id_bits) {
+ // Extract group id using aligned 32-bit read.
Review Comment:
Why not use `SafeLoad` as in other places already?
(also, since this is non-trivial, factoring out the loading of a group id
could go into a dedicated inline function)
--
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]