Skip to content

Commit 353d36f

Browse files
committed
Remove no-longer-used fields in Hash and HashJoin nodes.
1 parent 26069a5 commit 353d36f

File tree

6 files changed

+21
-87
lines changed

6 files changed

+21
-87
lines changed

src/backend/nodes/copyfuncs.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.79 1999/05/12 15:01:31 wieck Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.80 1999/05/18 21:34:27 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -357,10 +357,6 @@ _copyHashJoin(HashJoin *from)
357357

358358
newnode->hashjoinop = from->hashjoinop;
359359

360-
/* both are unused !.. */
361-
newnode->hashjointablekey = from->hashjointablekey;
362-
newnode->hashjointablesize = from->hashjointablesize;
363-
364360
return newnode;
365361
}
366362

@@ -545,10 +541,6 @@ _copyHash(Hash *from)
545541
*/
546542
Node_Copy(from, newnode, hashkey);
547543

548-
/* both are unused !.. */
549-
newnode->hashtablekey = from->hashtablekey;
550-
newnode->hashtablesize = from->hashtablesize;
551-
552544
return newnode;
553545
}
554546

src/backend/nodes/outfuncs.c

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Copyright (c) 1994, Regents of the University of California
77
*
8-
* $Id: outfuncs.c,v 1.82 1999/05/17 17:03:13 momjian Exp $
8+
* $Id: outfuncs.c,v 1.83 1999/05/18 21:34:28 tgl Exp $
99
*
1010
* NOTES
1111
* Every (plan) node in POSTGRES has an associated "out" routine which
@@ -385,14 +385,11 @@ _outHashJoin(StringInfo str, HashJoin *node)
385385
_outNode(str, node->hashclauses);
386386

387387
appendStringInfo(str,
388-
" :hashjoinop %u :hashjointable 0x%x :hashjointablekey %d ",
389-
node->hashjoinop,
390-
(int) node->hashjointable,
391-
node->hashjointablekey);
388+
" :hashjoinop %u ",
389+
node->hashjoinop);
392390

393391
appendStringInfo(str,
394-
" :hashjointablesize %d :hashdone %d ",
395-
node->hashjointablesize,
392+
" :hashdone %d ",
396393
node->hashdone);
397394
}
398395

@@ -536,11 +533,6 @@ _outHash(StringInfo str, Hash *node)
536533

537534
appendStringInfo(str, " :hashkey ");
538535
_outNode(str, node->hashkey);
539-
540-
appendStringInfo(str, " :hashtable 0x%x :hashtablekey %d :hashtablesize %d ",
541-
(int) node->hashtable,
542-
node->hashtablekey,
543-
node->hashtablesize);
544536
}
545537

546538
/*****************************************************************************

src/backend/nodes/readfuncs.c

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.62 1999/05/17 17:03:14 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.63 1999/05/18 21:34:29 tgl Exp $
1111
*
1212
* NOTES
1313
* Most of the read functions for plan nodes are tested. (In fact, they
@@ -454,18 +454,6 @@ _readHashJoin()
454454
token = lsptok(NULL, &length); /* get hashjoinop */
455455
local_node->hashjoinop = strtoul(token, NULL, 10);
456456

457-
token = lsptok(NULL, &length); /* eat :hashjointable */
458-
token = lsptok(NULL, &length); /* eat hashjointable */
459-
local_node->hashjointable = NULL;
460-
461-
token = lsptok(NULL, &length); /* eat :hashjointablekey */
462-
token = lsptok(NULL, &length); /* eat hashjointablekey */
463-
local_node->hashjointablekey = 0;
464-
465-
token = lsptok(NULL, &length); /* eat :hashjointablesize */
466-
token = lsptok(NULL, &length); /* eat hashjointablesize */
467-
local_node->hashjointablesize = 0;
468-
469457
token = lsptok(NULL, &length); /* eat :hashdone */
470458
token = lsptok(NULL, &length); /* eat hashdone */
471459
local_node->hashdone = false;
@@ -680,18 +668,6 @@ _readHash()
680668
token = lsptok(NULL, &length); /* eat :hashkey */
681669
local_node->hashkey = (Var *) nodeRead(true);
682670

683-
token = lsptok(NULL, &length); /* eat :hashtable */
684-
token = lsptok(NULL, &length); /* eat hashtable address */
685-
local_node->hashtable = NULL;
686-
687-
token = lsptok(NULL, &length); /* eat :hashtablekey */
688-
token = lsptok(NULL, &length); /* get hashtablekey */
689-
local_node->hashtablekey = 0;
690-
691-
token = lsptok(NULL, &length); /* eat :hashtablesize */
692-
token = lsptok(NULL, &length); /* get hashtablesize */
693-
local_node->hashtablesize = 0;
694-
695671
return local_node;
696672
}
697673

src/backend/optimizer/plan/createplan.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.54 1999/05/10 00:45:19 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.55 1999/05/18 21:34:29 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1050,9 +1050,6 @@ make_hashjoin(List *tlist,
10501050
plan->lefttree = lefttree;
10511051
plan->righttree = righttree;
10521052
node->hashclauses = hashclauses;
1053-
node->hashjointable = NULL;
1054-
node->hashjointablekey = 0;
1055-
node->hashjointablesize = 0;
10561053
node->hashdone = false;
10571054

10581055
return node;
@@ -1071,9 +1068,6 @@ make_hash(List *tlist, Var *hashkey, Plan *lefttree)
10711068
plan->lefttree = lefttree;
10721069
plan->righttree = NULL;
10731070
node->hashkey = hashkey;
1074-
node->hashtable = NULL;
1075-
node->hashtablekey = 0;
1076-
node->hashtablesize = 0;
10771071

10781072
return node;
10791073
}

src/include/nodes/execnodes.h

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: execnodes.h,v 1.27 1999/03/23 16:51:00 momjian Exp $
9+
* $Id: execnodes.h,v 1.28 1999/05/18 21:34:26 tgl Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -492,24 +492,16 @@ typedef struct MergeJoinState
492492
/* ----------------
493493
* HashJoinState information
494494
*
495-
* hj_HashTable address of the hash table for the hashjoin
496-
* hj_HashTableShmId shared memory id of hash table
497-
* hj_CurBucket the current hash bucket that we are searching
498-
* for matches of the current outer tuple
499-
* hj_CurTuple the current matching inner tuple in the
500-
* current hash bucket
501-
* hj_CurOTuple the current matching inner tuple in the
502-
* current hash overflow chain
495+
* hj_HashTable hash table for the hashjoin
496+
* hj_CurBucketNo bucket# for current outer tuple
497+
* hj_CurTuple last inner tuple matched to current outer
498+
* tuple, or NULL if starting search
499+
* (CurBucketNo and CurTuple are meaningless
500+
* unless OuterTupleSlot is nonempty!)
503501
* hj_InnerHashKey the inner hash key in the hashjoin condition
504-
* hj_OuterBatches file descriptors for outer batches
505-
* hj_InnerBatches file descriptors for inner batches
506-
* hj_OuterReadPos current read position of outer batch
507-
* hj_OuterReadBlk current read block of outer batch
508502
* hj_OuterTupleSlot tuple slot for outer tuples
509503
* hj_HashTupleSlot tuple slot for hashed tuples
510504
*
511-
*
512-
*
513505
* JoinState information
514506
*
515507
* CommonState information
@@ -525,16 +517,10 @@ typedef struct MergeJoinState
525517
typedef struct HashJoinState
526518
{
527519
JoinState jstate; /* its first field is NodeTag */
528-
HashJoinTable hj_HashTable;
529-
IpcMemoryId hj_HashTableShmId;
530-
HashBucket hj_CurBucket;
531-
HeapTuple hj_CurTuple;
532-
OverflowTuple hj_CurOTuple;
533-
Var *hj_InnerHashKey;
534-
File *hj_OuterBatches;
535-
File *hj_InnerBatches;
536-
char *hj_OuterReadPos;
537-
int hj_OuterReadBlk;
520+
HashJoinTable hj_HashTable;
521+
int hj_CurBucketNo;
522+
HashJoinTuple hj_CurTuple;
523+
Var *hj_InnerHashKey;
538524
TupleTableSlot *hj_OuterTupleSlot;
539525
TupleTableSlot *hj_HashTupleSlot;
540526
} HashJoinState;
@@ -668,7 +654,7 @@ typedef CommonState UniqueState;
668654
/* ----------------
669655
* HashState information
670656
*
671-
* hashBatches file descriptors for the batches
657+
* hashtable hash table for the hashjoin
672658
*
673659
* CommonState information
674660
*
@@ -683,7 +669,7 @@ typedef CommonState UniqueState;
683669
typedef struct HashState
684670
{
685671
CommonState cstate; /* its first field is NodeTag */
686-
File *hashBatches;
672+
HashJoinTable hashtable;
687673
} HashState;
688674

689675
#ifdef NOT_USED

src/include/nodes/plannodes.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: plannodes.h,v 1.24 1999/03/23 16:51:04 momjian Exp $
9+
* $Id: plannodes.h,v 1.25 1999/05/18 21:34:26 tgl Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -221,9 +221,6 @@ typedef struct HashJoin
221221
List *hashclauses;
222222
Oid hashjoinop;
223223
HashJoinState *hashjoinstate;
224-
HashJoinTable hashjointable;
225-
IpcMemoryKey hashjointablekey;
226-
int hashjointablesize;
227224
bool hashdone;
228225
} HashJoin;
229226

@@ -320,9 +317,6 @@ typedef struct Hash
320317
Plan plan;
321318
Var *hashkey;
322319
HashState *hashstate;
323-
HashJoinTable hashtable;
324-
IpcMemoryKey hashtablekey;
325-
int hashtablesize;
326320
} Hash;
327321

328322
#ifdef NOT_USED

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy