MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / allocateHashSlots

Method allocateHashSlots

src/processor/operator/hash_join/join_hash_table.cpp:107–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107void 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
116void JoinHashTable::buildHashSlots() {
117 for (auto& tupleBlock : factorizedTable->getTupleDataBlocks()) {

Callers 1

finalizeInternalMethod · 0.80

Calls 3

nextPowerOfTwoFunction · 0.85
emplace_backMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected