* Hash function for MCVFreqPair struct pointer. * Input: * keyPtr - pointer to hash key * keysize - not used, hash function must have this signature * Output: * result - hash value as an unsigned integer */
| 468 | * result - hash value as an unsigned integer |
| 469 | */ |
| 470 | static uint32 |
| 471 | datumHashTableHash(const void *keyPtr, Size keysize) |
| 472 | { |
| 473 | uint32 result; |
| 474 | MCVFreqPair *mcvFreqPair = *((MCVFreqPair **)keyPtr); |
| 475 | FmgrInfo *hashfunc = &mcvFreqPair->typinfo->hashfunc; |
| 476 | Oid collid = mcvFreqPair->typinfo->collid; |
| 477 | |
| 478 | result = DatumGetUInt32(FunctionCall1Coll(hashfunc, collid, mcvFreqPair->mcv)); |
| 479 | |
| 480 | return result; |
| 481 | } |
| 482 | |
| 483 | /** |
| 484 | * Match function for MCVFreqPair struct pointer. |
nothing calls this directly
no test coverage detected