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

Commitf674743

Browse files
committed
Remove no-longer-needed fields of Hash plan nodes.
skewColType/skewColTypmod are no longer used in the wake of commit9aab83f, 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 parentf04c9a6 commitf674743

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
returnnewnode;
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
staticvoid

‎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
staticHash*make_hash(Plan*lefttree,
225225
OidskewTable,
226226
AttrNumberskewColumn,
227-
boolskewInherit,
228-
OidskewColType,
229-
int32skewColTypmod);
227+
boolskewInherit);
230228
staticMergeJoin*make_mergejoin(List*tlist,
231229
List*joinclauses,List*otherclauses,
232230
List*mergeclauses,
@@ -4065,8 +4063,6 @@ create_hashjoin_plan(PlannerInfo *root,
40654063
OidskewTable=InvalidOid;
40664064
AttrNumberskewColumn=InvalidAttrNumber;
40674065
boolskewInherit= false;
4068-
OidskewColType=InvalidOid;
4069-
int32skewColTypmod=-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
OidskewTable,
54295421
AttrNumberskewColumn,
5430-
boolskewInherit,
5431-
OidskewColType,
5432-
int32skewColTypmod)
5422+
boolskewInherit)
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
returnnode;
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
typedefstructHash
@@ -868,8 +867,6 @@ typedef struct Hash
868867
OidskewTable;/* outer join key's table OID, or InvalidOid */
869868
AttrNumberskewColumn;/* outer join key's column #, or zero */
870869
boolskewInherit;/* is outer join rel an inheritance tree? */
871-
OidskewColType;/* datatype of the outer key column */
872-
int32skewColTypmod;/* typmod of the outer key column */
873870
/* all other info is in the parent HashJoin node */
874871
}Hash;
875872

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp