MCPcopy Create free account
hub / github.com/bytedance/bolt / directAddRows

Method directAddRows

bolt/exec/HashTable.cpp:2271–2301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2269
2270template <bool ignoreNullKeys>
2271void HashTable<ignoreNullKeys>::directAddRows(
2272 HashLookup& lookup,
2273 const RowVectorPtr& input,
2274 SelectivityVector& rows,
2275 bool decodeAndRemoveNulls) {
2276 auto& hashers = lookup.hashers;
2277
2278 // TODO: replace this later
2279 for (auto& hasher : hashers) {
2280 auto key = input->childAt(hasher->channel())->loadedVector();
2281 hasher->decode(*key, rows);
2282 }
2283
2284 if (decodeAndRemoveNulls) {
2285 // A null in any of the keys disables the row.
2286 deselectRowsWithNulls(hashers, rows);
2287 }
2288
2289 lookup.reset(rows.end());
2290 populateLookupRows(rows, lookup.rows);
2291
2292 incrementProbes(lookup.rows.size());
2293 // insert new entry
2294 for (const auto& row : lookup.rows) {
2295 char* group = rows_->newRow();
2296 lookup.hits[row] = group; // NOLINT
2297 storeKeys(lookup, row);
2298 ++numDistinct_;
2299 lookup.newGroups.push_back(row);
2300 }
2301}
2302
2303void BaseHashTable::prepareForGroupProbe(
2304 HashLookup& lookup,

Callers 1

addInputForActiveRowsMethod · 0.80

Calls 11

deselectRowsWithNullsFunction · 0.85
populateLookupRowsFunction · 0.85
childAtMethod · 0.80
loadedVectorMethod · 0.45
channelMethod · 0.45
decodeMethod · 0.45
resetMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45
newRowMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected