| 105 | } |
| 106 | |
| 107 | void JoinHashTable::allocateHashSlots(uint64_t numTuples) { |
| 108 | setMaxNumHashSlots(nextPowerOfTwo(numTuples * 2)); |
| 109 | auto numSlotsPerBlock = (uint64_t)1 << numSlotsPerBlockLog2; |
| 110 | auto numBlocksNeeded = (maxNumHashSlots + numSlotsPerBlock - 1) / numSlotsPerBlock; |
| 111 | while (hashSlotsBlocks.size() < numBlocksNeeded) { |
| 112 | hashSlotsBlocks.emplace_back(std::make_unique<DataBlock>(memoryManager, HASH_BLOCK_SIZE)); |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | void JoinHashTable::buildHashSlots() { |
| 117 | for (auto& tupleBlock : factorizedTable->getTupleDataBlocks()) { |
no test coverage detected