1 /*------------------------------------------------------------------------- 2 * 3 * nodeHash.h 4 * prototypes for nodeHash.c 5 * 6 * 7 * Portions Copyright (c) 1996-2017, 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 "nodes/execnodes.h" 18 19 extern HashState *ExecInitHash(Hash *node, EState *estate, int eflags); 20 extern Node *MultiExecHash(HashState *node); 21 extern void ExecEndHash(HashState *node); 22 extern void ExecReScanHash(HashState *node); 23 24 extern HashJoinTable ExecHashTableCreate(Hash *node, List *hashOperators, 25 bool keepNulls); 26 extern void ExecHashTableDestroy(HashJoinTable hashtable); 27 extern void ExecHashTableInsert(HashJoinTable hashtable, 28 TupleTableSlot *slot, 29 uint32 hashvalue); 30 extern bool ExecHashGetHashValue(HashJoinTable hashtable, 31 ExprContext *econtext, 32 List *hashkeys, 33 bool outer_tuple, 34 bool keep_nulls, 35 uint32 *hashvalue); 36 extern void ExecHashGetBucketAndBatch(HashJoinTable hashtable, 37 uint32 hashvalue, 38 int *bucketno, 39 int *batchno); 40 extern bool ExecScanHashBucket(HashJoinState *hjstate, ExprContext *econtext); 41 extern void ExecPrepHashTableForUnmatched(HashJoinState *hjstate); 42 extern bool ExecScanHashTableForUnmatched(HashJoinState *hjstate, 43 ExprContext *econtext); 44 extern void ExecHashTableReset(HashJoinTable hashtable); 45 extern void ExecHashTableResetMatchFlags(HashJoinTable hashtable); 46 extern void ExecChooseHashTableSize(double ntuples, int tupwidth, bool useskew, 47 int *numbuckets, 48 int *numbatches, 49 int *num_skew_mcvs); 50 extern int ExecHashGetSkewBucket(HashJoinTable hashtable, uint32 hashvalue); 51 52 #endif /* NODEHASH_H */ 53