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