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

Function TupleHashTableHash

src/backend/executor/execGrouping.c:348–365  ·  view source on GitHub ↗

* Compute the hash value for a tuple */

Source from the content-addressed store, hash-verified

346 * Compute the hash value for a tuple
347 */
348uint32
349TupleHashTableHash(TupleHashTable hashtable, TupleTableSlot *slot)
350{
351 MemoryContext oldContext;
352 uint32 hash;
353
354 hashtable->inputslot = slot;
355 hashtable->in_hash_funcs = hashtable->tab_hash_funcs;
356
357 /* Need to run the hash functions in short-lived context */
358 oldContext = MemoryContextSwitchTo(hashtable->tempcxt);
359
360 hash = TupleHashTableHash_internal(hashtable->hashtab, NULL);
361
362 MemoryContextSwitchTo(oldContext);
363
364 return hash;
365}
366
367/*
368 * A variant of LookupTupleHashEntry for callers that have already computed

Callers

nothing calls this directly

Calls 2

MemoryContextSwitchToFunction · 0.85

Tested by

no test coverage detected