1996-07-09 02:22:35 -04:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
|
*
|
1999-02-13 18:22:53 -05:00
|
|
|
* nodeHash.h
|
2003-01-10 18:54:24 -05:00
|
|
|
* prototypes for nodeHash.c
|
1996-07-09 02:22:35 -04:00
|
|
|
*
|
|
|
|
|
*
|
2017-01-03 13:48:53 -05:00
|
|
|
* Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
|
2000-01-26 00:58:53 -05:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-07-09 02:22:35 -04:00
|
|
|
*
|
2010-09-20 16:08:53 -04:00
|
|
|
* src/include/executor/nodeHash.h
|
1996-07-09 02:22:35 -04:00
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
1997-09-07 01:04:48 -04:00
|
|
|
#ifndef NODEHASH_H
|
|
|
|
|
#define NODEHASH_H
|
1996-07-09 02:22:35 -04:00
|
|
|
|
2002-12-05 10:50:39 -05:00
|
|
|
#include "nodes/execnodes.h"
|
1998-02-25 23:46:47 -05:00
|
|
|
|
2006-02-27 23:10:28 -05:00
|
|
|
extern HashState *ExecInitHash(Hash *node, EState *estate, int eflags);
|
2002-12-05 10:50:39 -05:00
|
|
|
extern TupleTableSlot *ExecHash(HashState *node);
|
2005-04-16 16:07:35 -04:00
|
|
|
extern Node *MultiExecHash(HashState *node);
|
2002-12-05 10:50:39 -05:00
|
|
|
extern void ExecEndHash(HashState *node);
|
2010-07-12 13:01:06 -04:00
|
|
|
extern void ExecReScanHash(HashState *node);
|
2002-12-05 10:50:39 -05:00
|
|
|
|
2010-12-30 20:24:55 -05:00
|
|
|
extern HashJoinTable ExecHashTableCreate(Hash *node, List *hashOperators,
|
2011-04-10 11:42:00 -04:00
|
|
|
bool keepNulls);
|
1997-09-07 22:41:22 -04:00
|
|
|
extern void ExecHashTableDestroy(HashJoinTable hashtable);
|
2000-07-11 22:37:39 -04:00
|
|
|
extern void ExecHashTableInsert(HashJoinTable hashtable,
|
2006-06-27 17:31:20 -04:00
|
|
|
TupleTableSlot *slot,
|
2005-10-14 22:49:52 -04:00
|
|
|
uint32 hashvalue);
|
2007-01-28 18:21:26 -05:00
|
|
|
extern bool ExecHashGetHashValue(HashJoinTable hashtable,
|
2005-10-14 22:49:52 -04:00
|
|
|
ExprContext *econtext,
|
2007-01-28 18:21:26 -05:00
|
|
|
List *hashkeys,
|
2007-01-29 20:33:36 -05:00
|
|
|
bool outer_tuple,
|
2007-01-28 18:21:26 -05:00
|
|
|
bool keep_nulls,
|
|
|
|
|
uint32 *hashvalue);
|
2005-03-06 17:15:05 -05:00
|
|
|
extern void ExecHashGetBucketAndBatch(HashJoinTable hashtable,
|
2005-10-14 22:49:52 -04:00
|
|
|
uint32 hashvalue,
|
|
|
|
|
int *bucketno,
|
|
|
|
|
int *batchno);
|
2010-12-30 20:24:55 -05:00
|
|
|
extern bool ExecScanHashBucket(HashJoinState *hjstate, ExprContext *econtext);
|
|
|
|
|
extern void ExecPrepHashTableForUnmatched(HashJoinState *hjstate);
|
|
|
|
|
extern bool ExecScanHashTableForUnmatched(HashJoinState *hjstate,
|
2011-04-10 11:42:00 -04:00
|
|
|
ExprContext *econtext);
|
2005-03-06 17:15:05 -05:00
|
|
|
extern void ExecHashTableReset(HashJoinTable hashtable);
|
2010-12-30 20:24:55 -05:00
|
|
|
extern void ExecHashTableResetMatchFlags(HashJoinTable hashtable);
|
2009-03-20 20:04:40 -04:00
|
|
|
extern void ExecChooseHashTableSize(double ntuples, int tupwidth, bool useskew,
|
2005-03-06 17:15:05 -05:00
|
|
|
int *numbuckets,
|
2009-03-20 20:04:40 -04:00
|
|
|
int *numbatches,
|
|
|
|
|
int *num_skew_mcvs);
|
|
|
|
|
extern int ExecHashGetSkewBucket(HashJoinTable hashtable, uint32 hashvalue);
|
2001-10-28 01:26:15 -05:00
|
|
|
|
2001-11-05 12:46:40 -05:00
|
|
|
#endif /* NODEHASH_H */
|