MCPcopy Create free account
hub / github.com/bytedance/bolt / prepareForJoinProbe

Method prepareForJoinProbe

bolt/exec/HashTable.cpp:2351–2383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2349}
2350
2351void BaseHashTable::prepareForJoinProbe(
2352 HashLookup& lookup,
2353 const RowVectorPtr& input,
2354 SelectivityVector& rows,
2355 bool decodeAndRemoveNulls) {
2356 auto& hashers = lookup.hashers;
2357
2358 if (decodeAndRemoveNulls) {
2359 for (auto& hasher : hashers) {
2360 auto key = input->childAt(hasher->channel())->loadedVector();
2361 hasher->decode(*key, rows);
2362 }
2363
2364 // A null in any of the keys disables the row.
2365 deselectRowsWithNulls(hashers, rows);
2366 }
2367
2368 lookup.reset(rows.end());
2369
2370 const auto mode = hashMode();
2371 for (auto i = 0; i < hashers.size(); ++i) {
2372 auto& hasher = hashers[i];
2373 if (mode != BaseHashTable::HashMode::kHash) {
2374 auto& key = input->childAt(hasher->channel());
2375 hashers_[i]->lookupValueIds(
2376 *key, rows, lookup.scratchMemory, lookup.hashes);
2377 } else {
2378 hasher->hash(rows, i > 0, lookup.hashes);
2379 }
2380 }
2381
2382 populateLookupRows(rows, lookup.rows);
2383}
2384
2385} // namespace bytedance::bolt::exec

Callers 1

addInputMethod · 0.80

Calls 11

deselectRowsWithNullsFunction · 0.85
populateLookupRowsFunction · 0.85
childAtMethod · 0.80
lookupValueIdsMethod · 0.80
loadedVectorMethod · 0.45
channelMethod · 0.45
decodeMethod · 0.45
resetMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45
hashMethod · 0.45

Tested by

no test coverage detected