| 2349 | } |
| 2350 | |
| 2351 | void 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 |
no test coverage detected