MCPcopy Create free account
hub / github.com/apache/cloudberry / LookupTupleHashEntryHash

Function LookupTupleHashEntryHash

src/backend/executor/execGrouping.c:371–392  ·  view source on GitHub ↗

* A variant of LookupTupleHashEntry for callers that have already computed * the hash value. */

Source from the content-addressed store, hash-verified

369 * the hash value.
370 */
371TupleHashEntry
372LookupTupleHashEntryHash(TupleHashTable hashtable, TupleTableSlot *slot,
373 bool *isnew, uint32 hash)
374{
375 TupleHashEntry entry;
376 MemoryContext oldContext;
377
378 /* Need to run the hash functions in short-lived context */
379 oldContext = MemoryContextSwitchTo(hashtable->tempcxt);
380
381 /* set up data needed by hash and match functions */
382 hashtable->inputslot = slot;
383 hashtable->in_hash_funcs = hashtable->tab_hash_funcs;
384 hashtable->cur_eq_func = hashtable->tab_eq_func;
385
386 entry = LookupTupleHashEntry_internal(hashtable, slot, isnew, hash);
387 Assert(entry == NULL || entry->hash == hash);
388
389 MemoryContextSwitchTo(oldContext);
390
391 return entry;
392}
393
394/*
395 * Search for a hashtable entry matching the given tuple. No entry is

Callers 1

agg_refill_hash_tableFunction · 0.85

Calls 2

MemoryContextSwitchToFunction · 0.85

Tested by

no test coverage detected