---------------------------------------------------------------- * MultiExecHash * * build hash table for hashjoin, doing partitioning if more * than one batch is required. * ---------------------------------------------------------------- */
| 127 | * ---------------------------------------------------------------- |
| 128 | */ |
| 129 | Node * |
| 130 | MultiExecHash(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 |
no test coverage detected