PostgreSQL Source Code  git master
nodeHash.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * nodeHash.h
4  * prototypes for nodeHash.c
5  *
6  *
7  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/executor/nodeHash.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef NODEHASH_H
15 #define NODEHASH_H
16 
17 #include "access/parallel.h"
18 #include "nodes/execnodes.h"
19 
20 struct SharedHashJoinBatch;
21 
22 extern HashState *ExecInitHash(Hash *node, EState *estate, int eflags);
23 extern Node *MultiExecHash(HashState *node);
24 extern void ExecEndHash(HashState *node);
25 extern void ExecReScanHash(HashState *node);
26 
27 extern HashJoinTable ExecHashTableCreate(HashState *state, List *hashOperators,
28  bool keepNulls);
29 extern void ExecParallelHashTableAlloc(HashJoinTable hashtable,
30  int batchno);
31 extern void ExecHashTableDestroy(HashJoinTable hashtable);
32 extern void ExecHashTableDetach(HashJoinTable hashtable);
33 extern void ExecHashTableDetachBatch(HashJoinTable hashtable);
35  int batchno);
36 
37 extern void ExecHashTableInsert(HashJoinTable hashtable,
38  TupleTableSlot *slot,
39  uint32 hashvalue);
40 extern void ExecParallelHashTableInsert(HashJoinTable hashtable,
41  TupleTableSlot *slot,
42  uint32 hashvalue);
44  TupleTableSlot *slot,
45  uint32 hashvalue);
46 extern bool ExecHashGetHashValue(HashJoinTable hashtable,
47  ExprContext *econtext,
48  List *hashkeys,
49  bool outer_tuple,
50  bool keep_nulls,
51  uint32 *hashvalue);
52 extern void ExecHashGetBucketAndBatch(HashJoinTable hashtable,
53  uint32 hashvalue,
54  int *bucketno,
55  int *batchno);
56 extern bool ExecScanHashBucket(HashJoinState *hjstate, ExprContext *econtext);
57 extern bool ExecParallelScanHashBucket(HashJoinState *hjstate, ExprContext *econtext);
58 extern void ExecPrepHashTableForUnmatched(HashJoinState *hjstate);
59 extern bool ExecScanHashTableForUnmatched(HashJoinState *hjstate,
60  ExprContext *econtext);
61 extern void ExecHashTableReset(HashJoinTable hashtable);
62 extern void ExecHashTableResetMatchFlags(HashJoinTable hashtable);
63 extern void ExecChooseHashTableSize(double ntuples, int tupwidth, bool useskew,
64  bool try_combined_work_mem,
65  int parallel_workers,
66  size_t *space_allowed,
67  int *numbuckets,
68  int *numbatches,
69  int *num_skew_mcvs);
70 extern int ExecHashGetSkewBucket(HashJoinTable hashtable, uint32 hashvalue);
71 extern void ExecHashEstimate(HashState *node, ParallelContext *pcxt);
72 extern void ExecHashInitializeDSM(HashState *node, ParallelContext *pcxt);
75 extern void ExecShutdownHash(HashState *node);
76 extern void ExecHashGetInstrumentation(HashInstrumentation *instrument,
77  HashJoinTable hashtable);
78 
79 #endif /* NODEHASH_H */
void ExecHashEstimate(HashState *node, ParallelContext *pcxt)
Definition: nodeHash.c:2544
bool ExecHashGetHashValue(HashJoinTable hashtable, ExprContext *econtext, List *hashkeys, bool outer_tuple, bool keep_nulls, uint32 *hashvalue)
Definition: nodeHash.c:1771
void ExecHashGetBucketAndBatch(HashJoinTable hashtable, uint32 hashvalue, int *bucketno, int *batchno)
Definition: nodeHash.c:1875
void ExecReScanHash(HashState *node)
Definition: nodeHash.c:2169
void ExecChooseHashTableSize(double ntuples, int tupwidth, bool useskew, bool try_combined_work_mem, int parallel_workers, size_t *space_allowed, int *numbuckets, int *numbatches, int *num_skew_mcvs)
Definition: nodeHash.c:662
Definition: nodes.h:517
void ExecHashTableResetMatchFlags(HashJoinTable hashtable)
Definition: nodeHash.c:2143
void ExecHashInitializeDSM(HashState *node, ParallelContext *pcxt)
Definition: nodeHash.c:2563
void ExecHashGetInstrumentation(HashInstrumentation *instrument, HashJoinTable hashtable)
Definition: nodeHash.c:2636
void ExecHashTableDetachBatch(HashJoinTable hashtable)
Definition: nodeHash.c:3056
void ExecHashTableDestroy(HashJoinTable hashtable)
Definition: nodeHash.c:849
void ExecPrepHashTableForUnmatched(HashJoinState *hjstate)
Definition: nodeHash.c:2019
HashJoinTable ExecHashTableCreate(HashState *state, List *hashOperators, bool keepNulls)
Definition: nodeHash.c:428
unsigned int uint32
Definition: c.h:325
void ExecShutdownHash(HashState *node)
Definition: nodeHash.c:2605
bool ExecParallelScanHashBucket(HashJoinState *hjstate, ExprContext *econtext)
Definition: nodeHash.c:1968
bool ExecScanHashTableForUnmatched(HashJoinState *hjstate, ExprContext *econtext)
Definition: nodeHash.c:2043
void ExecHashTableDetach(HashJoinTable hashtable)
Definition: nodeHash.c:3113
void ExecHashInitializeWorker(HashState *node, ParallelWorkerContext *pwcxt)
Definition: nodeHash.c:2585
void ExecEndHash(HashState *node)
Definition: nodeHash.c:404
Node * MultiExecHash(HashState *node)
Definition: nodeHash.c:105
void ExecParallelHashTableInsertCurrentBatch(HashJoinTable hashtable, TupleTableSlot *slot, uint32 hashvalue)
Definition: nodeHash.c:1735
void ExecParallelHashTableAlloc(HashJoinTable hashtable, int batchno)
Definition: nodeHash.c:3036
void ExecHashRetrieveInstrumentation(HashState *node)
Definition: nodeHash.c:2616
bool ExecScanHashBucket(HashJoinState *hjstate, ExprContext *econtext)
Definition: nodeHash.c:1907
Definition: regguts.h:298
HashState * ExecInitHash(Hash *node, EState *estate, int eflags)
Definition: nodeHash.c:352
void ExecHashTableReset(HashJoinTable hashtable)
Definition: nodeHash.c:2114
void ExecHashTableInsert(HashJoinTable hashtable, TupleTableSlot *slot, uint32 hashvalue)
Definition: nodeHash.c:1589
void ExecParallelHashTableSetCurrentBatch(HashJoinTable hashtable, int batchno)
Definition: nodeHash.c:3198
int ExecHashGetSkewBucket(HashJoinTable hashtable, uint32 hashvalue)
Definition: nodeHash.c:2343
Definition: pg_list.h:45
void ExecParallelHashTableInsert(HashJoinTable hashtable, TupleTableSlot *slot, uint32 hashvalue)
Definition: nodeHash.c:1674