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

Function build_hash_table

src/backend/executor/nodeSetOp.c:119–142  ·  view source on GitHub ↗

* Initialize the hash table to empty. */

Source from the content-addressed store, hash-verified

117 * Initialize the hash table to empty.
118 */
119static void
120build_hash_table(SetOpState *setopstate)
121{
122 SetOp *node = (SetOp *) setopstate->ps.plan;
123 ExprContext *econtext = setopstate->ps.ps_ExprContext;
124 TupleDesc desc = ExecGetResultType(outerPlanState(setopstate));
125
126 Assert(node->strategy == SETOP_HASHED);
127 Assert(node->numGroups > 0);
128
129 setopstate->hashtable = BuildTupleHashTableExt(&setopstate->ps,
130 desc,
131 node->numCols,
132 node->dupColIdx,
133 setopstate->eqfuncoids,
134 setopstate->hashfunctions,
135 node->dupCollations,
136 node->numGroups,
137 0,
138 setopstate->ps.state->es_query_cxt,
139 setopstate->tableContext,
140 econtext->ecxt_per_tuple_memory,
141 false);
142}
143
144/*
145 * We've completed processing a tuple group. Decide how many copies (if any)

Callers 1

ExecInitSetOpFunction · 0.70

Calls 2

ExecGetResultTypeFunction · 0.85
BuildTupleHashTableExtFunction · 0.85

Tested by

no test coverage detected