Skip to content

Commit f674743

Browse files
committed
Remove no-longer-needed fields of Hash plan nodes.
skewColType/skewColTypmod are no longer used in the wake of commit 9aab83f, and seem unlikely to be wanted in future, so let's drop 'em. Discussion: https://postgr.es/m/16364.1494520862@sss.pgh.pa.us
1 parent f04c9a6 commit f674743

File tree

5 files changed

+4
-25
lines changed

5 files changed

+4
-25
lines changed

src/backend/nodes/copyfuncs.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,8 +1052,6 @@ _copyHash(const Hash *from)
10521052
COPY_SCALAR_FIELD(skewTable);
10531053
COPY_SCALAR_FIELD(skewColumn);
10541054
COPY_SCALAR_FIELD(skewInherit);
1055-
COPY_SCALAR_FIELD(skewColType);
1056-
COPY_SCALAR_FIELD(skewColTypmod);
10571055

10581056
return newnode;
10591057
}

src/backend/nodes/outfuncs.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -898,8 +898,6 @@ _outHash(StringInfo str, const Hash *node)
898898
WRITE_OID_FIELD(skewTable);
899899
WRITE_INT_FIELD(skewColumn);
900900
WRITE_BOOL_FIELD(skewInherit);
901-
WRITE_OID_FIELD(skewColType);
902-
WRITE_INT_FIELD(skewColTypmod);
903901
}
904902

905903
static void

src/backend/nodes/readfuncs.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2187,8 +2187,6 @@ _readHash(void)
21872187
READ_OID_FIELD(skewTable);
21882188
READ_INT_FIELD(skewColumn);
21892189
READ_BOOL_FIELD(skewInherit);
2190-
READ_OID_FIELD(skewColType);
2191-
READ_INT_FIELD(skewColTypmod);
21922190

21932191
READ_DONE();
21942192
}

src/backend/optimizer/plan/createplan.c

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,7 @@ static HashJoin *make_hashjoin(List *tlist,
224224
static Hash *make_hash(Plan *lefttree,
225225
Oid skewTable,
226226
AttrNumber skewColumn,
227-
bool skewInherit,
228-
Oid skewColType,
229-
int32 skewColTypmod);
227+
bool skewInherit);
230228
static MergeJoin *make_mergejoin(List *tlist,
231229
List *joinclauses, List *otherclauses,
232230
List *mergeclauses,
@@ -4065,8 +4063,6 @@ create_hashjoin_plan(PlannerInfo *root,
40654063
Oid skewTable = InvalidOid;
40664064
AttrNumber skewColumn = InvalidAttrNumber;
40674065
bool skewInherit = false;
4068-
Oid skewColType = InvalidOid;
4069-
int32 skewColTypmod = -1;
40704066

40714067
/*
40724068
* HashJoin can project, so we don't have to demand exact tlists from the
@@ -4153,8 +4149,6 @@ create_hashjoin_plan(PlannerInfo *root,
41534149
skewTable = rte->relid;
41544150
skewColumn = var->varattno;
41554151
skewInherit = rte->inh;
4156-
skewColType = var->vartype;
4157-
skewColTypmod = var->vartypmod;
41584152
}
41594153
}
41604154
}
@@ -4165,9 +4159,7 @@ create_hashjoin_plan(PlannerInfo *root,
41654159
hash_plan = make_hash(inner_plan,
41664160
skewTable,
41674161
skewColumn,
4168-
skewInherit,
4169-
skewColType,
4170-
skewColTypmod);
4162+
skewInherit);
41714163

41724164
/*
41734165
* Set Hash node's startup & total costs equal to total cost of input
@@ -5427,9 +5419,7 @@ static Hash *
54275419
make_hash(Plan *lefttree,
54285420
Oid skewTable,
54295421
AttrNumber skewColumn,
5430-
bool skewInherit,
5431-
Oid skewColType,
5432-
int32 skewColTypmod)
5422+
bool skewInherit)
54335423
{
54345424
Hash *node = makeNode(Hash);
54355425
Plan *plan = &node->plan;
@@ -5442,8 +5432,6 @@ make_hash(Plan *lefttree,
54425432
node->skewTable = skewTable;
54435433
node->skewColumn = skewColumn;
54445434
node->skewInherit = skewInherit;
5445-
node->skewColType = skewColType;
5446-
node->skewColTypmod = skewColTypmod;
54475435

54485436
return node;
54495437
}

src/include/nodes/plannodes.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -858,8 +858,7 @@ typedef struct GatherMerge
858858
*
859859
* If the executor is supposed to try to apply skew join optimization, then
860860
* skewTable/skewColumn/skewInherit identify the outer relation's join key
861-
* column, from which the relevant MCV statistics can be fetched. Also, its
862-
* type information is provided to save a lookup.
861+
* column, from which the relevant MCV statistics can be fetched.
863862
* ----------------
864863
*/
865864
typedef struct Hash
@@ -868,8 +867,6 @@ typedef struct Hash
868867
Oid skewTable; /* outer join key's table OID, or InvalidOid */
869868
AttrNumber skewColumn; /* outer join key's column #, or zero */
870869
bool skewInherit; /* is outer join rel an inheritance tree? */
871-
Oid skewColType; /* datatype of the outer key column */
872-
int32 skewColTypmod; /* typmod of the outer key column */
873870
/* all other info is in the parent HashJoin node */
874871
} Hash;
875872

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