Decode hash table into a std::set for easy inspection and validation.
155 bool have_keys = ptr2 > ptr1;
156 bool have_offsets = ptr3 > ptr2;
157 bool have_counts = ptr4 > ptr3;
158 bool have_payloads = (ptr1 + buffer_size) > ptr4;
160 auto i32ptr2 =
reinterpret_cast<const int32_t*
>(ptr2);
161 auto i32ptr3 =
reinterpret_cast<const int32_t*
>(ptr3);
162 auto i32ptr4 =
reinterpret_cast<const int32_t*
>(ptr4);
165 CHECK(key_component_width == 8 || key_component_width == 4);
166 if (key_component_width == 8) {
167 if (!have_offsets && !have_counts) {
168 keyed_hash::to_set_one_to_one<int64_t>(ptr1, entry_count, key_component_count, s);
170 keyed_hash::to_set_one_to_many<int64_t>(
171 ptr1, i32ptr2, i32ptr3, i32ptr4, entry_count, key_component_count, s);
173 }
else if (key_component_width == 4) {
174 if (!have_offsets && !have_counts) {
175 keyed_hash::to_set_one_to_one<int32_t>(ptr1, entry_count, key_component_count, s);
177 keyed_hash::to_set_one_to_many<int32_t>(
178 ptr1, i32ptr2, i32ptr3, i32ptr4, entry_count, key_component_count, s);
182 if (!have_offsets && !have_counts && have_payloads) {
std::set< DecodedJoinHashBufferEntry > DecodedJoinHashBufferSet
void to_set_one_to_many(const int32_t *const ptr2, const int32_t *const ptr3, const int32_t *const ptr4, size_t entry_count, DecodedJoinHashBufferSet &s)
void to_set_one_to_one(const int32_t *const ptr4, size_t entry_count, DecodedJoinHashBufferSet &s)