* See whether two tuples (presumably of the same hash value) match */
| 545 | * See whether two tuples (presumably of the same hash value) match |
| 546 | */ |
| 547 | static int |
| 548 | TupleHashTableMatch(struct tuplehash_hash *tb, const MinimalTuple tuple1, const MinimalTuple tuple2) |
| 549 | { |
| 550 | TupleTableSlot *slot1; |
| 551 | TupleTableSlot *slot2; |
| 552 | TupleHashTable hashtable = (TupleHashTable) tb->private_data; |
| 553 | ExprContext *econtext = hashtable->exprcontext; |
| 554 | |
| 555 | /* |
| 556 | * We assume that simplehash.h will only ever call us with the first |
| 557 | * argument being an actual table entry, and the second argument being |
| 558 | * LookupTupleHashEntry's dummy TupleHashEntryData. The other direction |
| 559 | * could be supported too, but is not currently required. |
| 560 | */ |
| 561 | Assert(tuple1 != NULL); |
| 562 | slot1 = hashtable->tableslot; |
| 563 | ExecStoreMinimalTuple(tuple1, slot1, false); |
| 564 | Assert(tuple2 == NULL); |
| 565 | slot2 = hashtable->inputslot; |
| 566 | |
| 567 | /* For crosstype comparisons, the inputslot must be first */ |
| 568 | econtext->ecxt_innertuple = slot2; |
| 569 | econtext->ecxt_outertuple = slot1; |
| 570 | return !ExecQualAndReset(hashtable->cur_eq_func, econtext); |
| 571 | } |
nothing calls this directly
no test coverage detected