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

Function MultiExecHash

src/backend/executor/nodeHash.c:129–157  ·  view source on GitHub ↗

---------------------------------------------------------------- * MultiExecHash * * build hash table for hashjoin, doing partitioning if more * than one batch is required. * ---------------------------------------------------------------- */

Source from the content-addressed store, hash-verified

127 * ----------------------------------------------------------------
128 */
129Node *
130MultiExecHash(HashState *node)
131{
132 bool parallel = node->parallel_state != NULL;
133
134 /* must provide our own instrumentation support */
135 if (node->ps.instrument)
136 InstrStartNode(node->ps.instrument);
137
138 if (node->parallel_state != NULL)
139 MultiExecParallelHash(node);
140 else
141 MultiExecPrivateHash(node);
142
143 RFBuildFinishCallback(node->rfstate, parallel);
144
145 /* must provide our own instrumentation support */
146 if (node->ps.instrument)
147 InstrStopNode(node->ps.instrument, node->hashtable->partialTuples);
148
149 /*
150 * We do not return the hash table directly because it's not a subtype of
151 * Node, and so would violate the MultiExecProcNode API. Instead, our
152 * parent Hashjoin node is expected to know how to fish it out of our node
153 * state. Ugly but not really worth cleaning up, since Hashjoin knows
154 * quite a bit more about Hash besides that.
155 */
156 return NULL;
157}
158
159/* ----------------------------------------------------------------
160 * MultiExecPrivateHash

Callers 1

MultiExecProcNodeFunction · 0.85

Calls 5

InstrStartNodeFunction · 0.85
MultiExecParallelHashFunction · 0.85
MultiExecPrivateHashFunction · 0.85
RFBuildFinishCallbackFunction · 0.85
InstrStopNodeFunction · 0.85

Tested by

no test coverage detected