* Prepare to work on a given batch. */
| 3978 | * Prepare to work on a given batch. |
| 3979 | */ |
| 3980 | void |
| 3981 | ExecParallelHashTableSetCurrentBatch(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 |
no test coverage detected