nodeHash.h 1.9 KB

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