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

Function ExecParallelHashTableSetCurrentBatch

src/backend/executor/nodeHash.c:3980–3994  ·  view source on GitHub ↗

* Prepare to work on a given batch. */

Source from the content-addressed store, hash-verified

3978 * Prepare to work on a given batch.
3979 */
3980void
3981ExecParallelHashTableSetCurrentBatch(HashJoinTable hashtable, int batchno)
3982{
3983 Assert(hashtable->batches[batchno].shared->buckets != InvalidDsaPointer);
3984
3985 hashtable->curbatch = batchno;
3986 hashtable->buckets.shared = (dsa_pointer_atomic *)
3987 dsa_get_address(hashtable->area,
3988 hashtable->batches[batchno].shared->buckets);
3989 hashtable->nbuckets = hashtable->parallel_state->nbuckets;
3990 hashtable->log2_nbuckets = my_log2(hashtable->nbuckets);
3991 hashtable->current_chunk = NULL;
3992 hashtable->current_chunk_shared = InvalidDsaPointer;
3993 hashtable->batches[batchno].at_least_one_chunk = false;
3994}
3995
3996/*
3997 * Take the next available chunk from the queue of chunks being worked on in

Calls 2

dsa_get_addressFunction · 0.85
my_log2Function · 0.85

Tested by

no test coverage detected