| 127 | } |
| 128 | |
| 129 | void 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 | |
| 154 | sel_t JoinHashTable::matchFlatKeys(const std::vector<ValueVector*>& keyVectors, |
| 155 | uint8_t** probedTuples, uint8_t** matchedTuples) { |
no test coverage detected