diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index be70ef33fdf8953fff59ad2b6084a5ae9e11eaa0..87919b4dbab0b79c4758c96d4ef6c081ee2d27ea 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.79 1999/05/12 15:01:31 wieck Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.80 1999/05/18 21:34:27 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -357,10 +357,6 @@ _copyHashJoin(HashJoin *from) newnode->hashjoinop = from->hashjoinop; - /* both are unused !.. */ - newnode->hashjointablekey = from->hashjointablekey; - newnode->hashjointablesize = from->hashjointablesize; - return newnode; } @@ -545,10 +541,6 @@ _copyHash(Hash *from) */ Node_Copy(from, newnode, hashkey); - /* both are unused !.. */ - newnode->hashtablekey = from->hashtablekey; - newnode->hashtablesize = from->hashtablesize; - return newnode; } diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index bbab1a4964ad67f6f322a7ac876f7056d770ce85..f4fdb63637dc32fcf6b2120923efa63a63287eb3 100644 --- a/src/backend/nodes/outfuncs.c +++ b/src/backend/nodes/outfuncs.c @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: outfuncs.c,v 1.82 1999/05/17 17:03:13 momjian Exp $ + * $Id: outfuncs.c,v 1.83 1999/05/18 21:34:28 tgl Exp $ * * NOTES * Every (plan) node in POSTGRES has an associated "out" routine which @@ -385,14 +385,11 @@ _outHashJoin(StringInfo str, HashJoin *node) _outNode(str, node->hashclauses); appendStringInfo(str, - " :hashjoinop %u :hashjointable 0x%x :hashjointablekey %d ", - node->hashjoinop, - (int) node->hashjointable, - node->hashjointablekey); + " :hashjoinop %u ", + node->hashjoinop); appendStringInfo(str, - " :hashjointablesize %d :hashdone %d ", - node->hashjointablesize, + " :hashdone %d ", node->hashdone); } @@ -536,11 +533,6 @@ _outHash(StringInfo str, Hash *node) appendStringInfo(str, " :hashkey "); _outNode(str, node->hashkey); - - appendStringInfo(str, " :hashtable 0x%x :hashtablekey %d :hashtablesize %d ", - (int) node->hashtable, - node->hashtablekey, - node->hashtablesize); } /***************************************************************************** diff --git a/src/backend/nodes/readfuncs.c b/src/backend/nodes/readfuncs.c index ab491868ac9ba629a16c826d1cb5c7a2e0e97505..82ccdd2dac963367fc4ef4b0ed3601c16ec58901 100644 --- a/src/backend/nodes/readfuncs.c +++ b/src/backend/nodes/readfuncs.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.62 1999/05/17 17:03:14 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.63 1999/05/18 21:34:29 tgl Exp $ * * NOTES * Most of the read functions for plan nodes are tested. (In fact, they @@ -454,18 +454,6 @@ _readHashJoin() token = lsptok(NULL, &length); /* get hashjoinop */ local_node->hashjoinop = strtoul(token, NULL, 10); - token = lsptok(NULL, &length); /* eat :hashjointable */ - token = lsptok(NULL, &length); /* eat hashjointable */ - local_node->hashjointable = NULL; - - token = lsptok(NULL, &length); /* eat :hashjointablekey */ - token = lsptok(NULL, &length); /* eat hashjointablekey */ - local_node->hashjointablekey = 0; - - token = lsptok(NULL, &length); /* eat :hashjointablesize */ - token = lsptok(NULL, &length); /* eat hashjointablesize */ - local_node->hashjointablesize = 0; - token = lsptok(NULL, &length); /* eat :hashdone */ token = lsptok(NULL, &length); /* eat hashdone */ local_node->hashdone = false; @@ -680,18 +668,6 @@ _readHash() token = lsptok(NULL, &length); /* eat :hashkey */ local_node->hashkey = (Var *) nodeRead(true); - token = lsptok(NULL, &length); /* eat :hashtable */ - token = lsptok(NULL, &length); /* eat hashtable address */ - local_node->hashtable = NULL; - - token = lsptok(NULL, &length); /* eat :hashtablekey */ - token = lsptok(NULL, &length); /* get hashtablekey */ - local_node->hashtablekey = 0; - - token = lsptok(NULL, &length); /* eat :hashtablesize */ - token = lsptok(NULL, &length); /* get hashtablesize */ - local_node->hashtablesize = 0; - return local_node; } diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index 93d0b82071ab66be05551581292088fd15f31a9d..d228f9d058da5135aefcdf083ba006448fcedf22 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.54 1999/05/10 00:45:19 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.55 1999/05/18 21:34:29 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1050,9 +1050,6 @@ make_hashjoin(List *tlist, plan->lefttree = lefttree; plan->righttree = righttree; node->hashclauses = hashclauses; - node->hashjointable = NULL; - node->hashjointablekey = 0; - node->hashjointablesize = 0; node->hashdone = false; return node; @@ -1071,9 +1068,6 @@ make_hash(List *tlist, Var *hashkey, Plan *lefttree) plan->lefttree = lefttree; plan->righttree = NULL; node->hashkey = hashkey; - node->hashtable = NULL; - node->hashtablekey = 0; - node->hashtablesize = 0; return node; } diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 9685dacc62ec2abfb98f2a7eeb000afc3e6baa61..cdc713eafe189b6939906719587405e100b62f79 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: execnodes.h,v 1.27 1999/03/23 16:51:00 momjian Exp $ + * $Id: execnodes.h,v 1.28 1999/05/18 21:34:26 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -492,24 +492,16 @@ typedef struct MergeJoinState /* ---------------- * HashJoinState information * - * hj_HashTable address of the hash table for the hashjoin - * hj_HashTableShmId shared memory id of hash table - * hj_CurBucket the current hash bucket that we are searching - * for matches of the current outer tuple - * hj_CurTuple the current matching inner tuple in the - * current hash bucket - * hj_CurOTuple the current matching inner tuple in the - * current hash overflow chain + * hj_HashTable hash table for the hashjoin + * hj_CurBucketNo bucket# for current outer tuple + * hj_CurTuple last inner tuple matched to current outer + * tuple, or NULL if starting search + * (CurBucketNo and CurTuple are meaningless + * unless OuterTupleSlot is nonempty!) * hj_InnerHashKey the inner hash key in the hashjoin condition - * hj_OuterBatches file descriptors for outer batches - * hj_InnerBatches file descriptors for inner batches - * hj_OuterReadPos current read position of outer batch - * hj_OuterReadBlk current read block of outer batch * hj_OuterTupleSlot tuple slot for outer tuples * hj_HashTupleSlot tuple slot for hashed tuples * - * - * * JoinState information * * CommonState information @@ -525,16 +517,10 @@ typedef struct MergeJoinState typedef struct HashJoinState { JoinState jstate; /* its first field is NodeTag */ - HashJoinTable hj_HashTable; - IpcMemoryId hj_HashTableShmId; - HashBucket hj_CurBucket; - HeapTuple hj_CurTuple; - OverflowTuple hj_CurOTuple; - Var *hj_InnerHashKey; - File *hj_OuterBatches; - File *hj_InnerBatches; - char *hj_OuterReadPos; - int hj_OuterReadBlk; + HashJoinTable hj_HashTable; + int hj_CurBucketNo; + HashJoinTuple hj_CurTuple; + Var *hj_InnerHashKey; TupleTableSlot *hj_OuterTupleSlot; TupleTableSlot *hj_HashTupleSlot; } HashJoinState; @@ -668,7 +654,7 @@ typedef CommonState UniqueState; /* ---------------- * HashState information * - * hashBatches file descriptors for the batches + * hashtable hash table for the hashjoin * * CommonState information * @@ -683,7 +669,7 @@ typedef CommonState UniqueState; typedef struct HashState { CommonState cstate; /* its first field is NodeTag */ - File *hashBatches; + HashJoinTable hashtable; } HashState; #ifdef NOT_USED diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h index 25c38f228cc383ad66efda18ff9d73fa7411a6bd..0805665b06529f15bba09c702efdb1ae435216bd 100644 --- a/src/include/nodes/plannodes.h +++ b/src/include/nodes/plannodes.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: plannodes.h,v 1.24 1999/03/23 16:51:04 momjian Exp $ + * $Id: plannodes.h,v 1.25 1999/05/18 21:34:26 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -221,9 +221,6 @@ typedef struct HashJoin List *hashclauses; Oid hashjoinop; HashJoinState *hashjoinstate; - HashJoinTable hashjointable; - IpcMemoryKey hashjointablekey; - int hashjointablesize; bool hashdone; } HashJoin; @@ -320,9 +317,6 @@ typedef struct Hash Plan plan; Var *hashkey; HashState *hashstate; - HashJoinTable hashtable; - IpcMemoryKey hashtablekey; - int hashtablesize; } Hash; #ifdef NOT_USED