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

Method probe

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

Source from the content-addressed store, hash-verified

127}
128
129void JoinHashTable::probe(const std::vector<ValueVector*>& keyVectors, ValueVector& hashVector,
130 SelectionVector& hashSelVec, ValueVector* tmpHashResultVector, uint8_t** probedTuples) {
131 DASSERT(keyVectors.size() == keyTypes.size());
132 if (getNumEntries() == 0) {
133 return;
134 }
135 if (!discardNullFromKeys(keyVectors)) {
136 return;
137 }
138 hashSelVec.setSelSize(keyVectors[0]->state->getSelVector().getSelSize());
139 VectorHashFunction::computeHash(*keyVectors[0], keyVectors[0]->state->getSelVector(),
140 hashVector, hashSelVec);
141 for (auto i = 1u; i < keyVectors.size(); i++) {
142 hashSelVec.setSelSize(keyVectors[i]->state->getSelVector().getSelSize());
143 VectorHashFunction::computeHash(*keyVectors[i], keyVectors[i]->state->getSelVector(),
144 *tmpHashResultVector, hashSelVec);
145 VectorHashFunction::combineHash(hashVector, hashSelVec, *tmpHashResultVector, hashSelVec,
146 hashVector, hashSelVec);
147 }
148 for (auto i = 0u; i < hashSelVec.getSelSize(); i++) {
149 DASSERT(i < DEFAULT_VECTOR_CAPACITY);
150 probedTuples[i] = getTupleForHash(hashVector.getValue<hash_t>(hashSelVec[i]));
151 }
152}
153
154sel_t JoinHashTable::matchFlatKeys(const std::vector<ValueVector*>& keyVectors,
155 uint8_t** probedTuples, uint8_t** matchedTuples) {

Callers 2

Calls 5

getNumEntriesFunction · 0.85
discardNullFromKeysFunction · 0.85
setSelSizeMethod · 0.80
getSelSizeMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected