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

Function TupleHashTableMatch

src/backend/executor/execGrouping.c:547–571  ·  view source on GitHub ↗

* See whether two tuples (presumably of the same hash value) match */

Source from the content-addressed store, hash-verified

545 * See whether two tuples (presumably of the same hash value) match
546 */
547static int
548TupleHashTableMatch(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}

Callers

nothing calls this directly

Calls 2

ExecStoreMinimalTupleFunction · 0.85
ExecQualAndResetFunction · 0.85

Tested by

no test coverage detected