Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit353d36f

Browse files
committed
Remove no-longer-used fields in Hash and HashJoin nodes.
1 parent26069a5 commit353d36f

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
returnnewnode;
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
returnnewnode;
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
returnlocal_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
returnnode;
@@ -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
returnnode;
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_HashTableaddress of the hash table for the hashjoin
496-
*hj_HashTableShmIdshared memory id of hash table
497-
*hj_CurBucketthe current hash bucket that we are searching
498-
*for matches of the current outer tuple
499-
*hj_CurTuplethe current matching inner tuple in the
500-
*current hash bucket
501-
*hj_CurOTuplethe current matching inner tuple in the
502-
*current hash overflow chain
495+
*hj_HashTablehash table for the hashjoin
496+
*hj_CurBucketNobucket# for current outer tuple
497+
*hj_CurTuplelast 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_InnerHashKeythe inner hash key in the hashjoin condition
504-
*hj_OuterBatchesfile descriptors for outer batches
505-
*hj_InnerBatchesfile descriptors for inner batches
506-
*hj_OuterReadPoscurrent read position of outer batch
507-
*hj_OuterReadBlkcurrent read block of outer batch
508502
*hj_OuterTupleSlottuple slot for outer tuples
509503
*hj_HashTupleSlottuple slot for hashed tuples
510504
*
511-
*
512-
*
513505
* JoinState information
514506
*
515507
* CommonState information
@@ -525,16 +517,10 @@ typedef struct MergeJoinState
525517
typedefstructHashJoinState
526518
{
527519
JoinStatejstate;/* its first field is NodeTag */
528-
HashJoinTablehj_HashTable;
529-
IpcMemoryIdhj_HashTableShmId;
530-
HashBuckethj_CurBucket;
531-
HeapTuplehj_CurTuple;
532-
OverflowTuplehj_CurOTuple;
533-
Var*hj_InnerHashKey;
534-
File*hj_OuterBatches;
535-
File*hj_InnerBatches;
536-
char*hj_OuterReadPos;
537-
inthj_OuterReadBlk;
520+
HashJoinTablehj_HashTable;
521+
inthj_CurBucketNo;
522+
HashJoinTuplehj_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 descriptorsfor thebatches
657+
*hashtablehash tablefor thehashjoin
672658
*
673659
* CommonState information
674660
*
@@ -683,7 +669,7 @@ typedef CommonState UniqueState;
683669
typedefstructHashState
684670
{
685671
CommonStatecstate;/* its first field is NodeTag */
686-
File*hashBatches;
672+
HashJoinTablehashtable;
687673
}HashState;
688674

689675
#ifdefNOT_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
Oidhashjoinop;
223223
HashJoinState*hashjoinstate;
224-
HashJoinTablehashjointable;
225-
IpcMemoryKeyhashjointablekey;
226-
inthashjointablesize;
227224
boolhashdone;
228225
}HashJoin;
229226

@@ -320,9 +317,6 @@ typedef struct Hash
320317
Planplan;
321318
Var*hashkey;
322319
HashState*hashstate;
323-
HashJoinTablehashtable;
324-
IpcMemoryKeyhashtablekey;
325-
inthashtablesize;
326320
}Hash;
327321

328322
#ifdefNOT_USED

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp