/* * Initialize the hash table to empty. */ static void build_hash_table(RecursiveUnionState *rustate) { RecursiveUnion *node = (RecursiveUnion *) rustate->ps.plan; Assert(node->numCols > 0); Assert(node->numGroups > 0); rustate->hashtable = BuildTupleHashTable(node->numCols, node->dupColIdx, rustate->eqfunctions, rustate->hashfunctions, node->numGroups, sizeof(RUHashEntryData), rustate->tableContext, rustate->tempContext); }
/* * Initialize the hash table to empty. */ static void build_hash_table(SetOpState *setopstate) { SetOp *node = (SetOp *) setopstate->ps.plan; Assert(node->strategy == SETOP_HASHED); Assert(node->numGroups > 0); setopstate->hashtable = BuildTupleHashTable(node->numCols, node->dupColIdx, setopstate->eqfunctions, setopstate->hashfunctions, node->numGroups, sizeof(SetOpHashEntryData), setopstate->tableContext, setopstate->tempContext); }
/* * Initialize the hash table to empty. */ static void build_hash_table(SetOpState *setopstate) { SetOp *node = (SetOp *) setopstate->ps.plan; ExprContext *econtext = setopstate->ps.ps_ExprContext; TupleDesc desc = ExecGetResultType(outerPlanState(setopstate)); Assert(node->strategy == SETOP_HASHED); Assert(node->numGroups > 0); setopstate->hashtable = BuildTupleHashTable(&setopstate->ps, desc, node->numCols, node->dupColIdx, setopstate->eqfuncoids, setopstate->hashfunctions, node->numGroups, 0, setopstate->tableContext, econtext->ecxt_per_tuple_memory, false); }