* Compute the hash value for a tuple */
| 346 | * Compute the hash value for a tuple |
| 347 | */ |
| 348 | uint32 |
| 349 | TupleHashTableHash(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 |
nothing calls this directly
no test coverage detected