mirror of
https://github.com/postgres/postgres.git
synced 2025-04-21 12:05:57 +03:00
Remove no-longer-needed fields of Hash plan nodes.
skewColType/skewColTypmod are no longer used in the wake of commit 9aab83fc5, and seem unlikely to be wanted in future, so let's drop 'em. Discussion: https://postgr.es/m/16364.1494520862@sss.pgh.pa.us
This commit is contained in:
parent
f04c9a6146
commit
f674743487
@ -1052,8 +1052,6 @@ _copyHash(const Hash *from)
|
|||||||
COPY_SCALAR_FIELD(skewTable);
|
COPY_SCALAR_FIELD(skewTable);
|
||||||
COPY_SCALAR_FIELD(skewColumn);
|
COPY_SCALAR_FIELD(skewColumn);
|
||||||
COPY_SCALAR_FIELD(skewInherit);
|
COPY_SCALAR_FIELD(skewInherit);
|
||||||
COPY_SCALAR_FIELD(skewColType);
|
|
||||||
COPY_SCALAR_FIELD(skewColTypmod);
|
|
||||||
|
|
||||||
return newnode;
|
return newnode;
|
||||||
}
|
}
|
||||||
|
@ -898,8 +898,6 @@ _outHash(StringInfo str, const Hash *node)
|
|||||||
WRITE_OID_FIELD(skewTable);
|
WRITE_OID_FIELD(skewTable);
|
||||||
WRITE_INT_FIELD(skewColumn);
|
WRITE_INT_FIELD(skewColumn);
|
||||||
WRITE_BOOL_FIELD(skewInherit);
|
WRITE_BOOL_FIELD(skewInherit);
|
||||||
WRITE_OID_FIELD(skewColType);
|
|
||||||
WRITE_INT_FIELD(skewColTypmod);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -2187,8 +2187,6 @@ _readHash(void)
|
|||||||
READ_OID_FIELD(skewTable);
|
READ_OID_FIELD(skewTable);
|
||||||
READ_INT_FIELD(skewColumn);
|
READ_INT_FIELD(skewColumn);
|
||||||
READ_BOOL_FIELD(skewInherit);
|
READ_BOOL_FIELD(skewInherit);
|
||||||
READ_OID_FIELD(skewColType);
|
|
||||||
READ_INT_FIELD(skewColTypmod);
|
|
||||||
|
|
||||||
READ_DONE();
|
READ_DONE();
|
||||||
}
|
}
|
||||||
|
@ -224,9 +224,7 @@ static HashJoin *make_hashjoin(List *tlist,
|
|||||||
static Hash *make_hash(Plan *lefttree,
|
static Hash *make_hash(Plan *lefttree,
|
||||||
Oid skewTable,
|
Oid skewTable,
|
||||||
AttrNumber skewColumn,
|
AttrNumber skewColumn,
|
||||||
bool skewInherit,
|
bool skewInherit);
|
||||||
Oid skewColType,
|
|
||||||
int32 skewColTypmod);
|
|
||||||
static MergeJoin *make_mergejoin(List *tlist,
|
static MergeJoin *make_mergejoin(List *tlist,
|
||||||
List *joinclauses, List *otherclauses,
|
List *joinclauses, List *otherclauses,
|
||||||
List *mergeclauses,
|
List *mergeclauses,
|
||||||
@ -4065,8 +4063,6 @@ create_hashjoin_plan(PlannerInfo *root,
|
|||||||
Oid skewTable = InvalidOid;
|
Oid skewTable = InvalidOid;
|
||||||
AttrNumber skewColumn = InvalidAttrNumber;
|
AttrNumber skewColumn = InvalidAttrNumber;
|
||||||
bool skewInherit = false;
|
bool skewInherit = false;
|
||||||
Oid skewColType = InvalidOid;
|
|
||||||
int32 skewColTypmod = -1;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* HashJoin can project, so we don't have to demand exact tlists from the
|
* HashJoin can project, so we don't have to demand exact tlists from the
|
||||||
@ -4153,8 +4149,6 @@ create_hashjoin_plan(PlannerInfo *root,
|
|||||||
skewTable = rte->relid;
|
skewTable = rte->relid;
|
||||||
skewColumn = var->varattno;
|
skewColumn = var->varattno;
|
||||||
skewInherit = rte->inh;
|
skewInherit = rte->inh;
|
||||||
skewColType = var->vartype;
|
|
||||||
skewColTypmod = var->vartypmod;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4165,9 +4159,7 @@ create_hashjoin_plan(PlannerInfo *root,
|
|||||||
hash_plan = make_hash(inner_plan,
|
hash_plan = make_hash(inner_plan,
|
||||||
skewTable,
|
skewTable,
|
||||||
skewColumn,
|
skewColumn,
|
||||||
skewInherit,
|
skewInherit);
|
||||||
skewColType,
|
|
||||||
skewColTypmod);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set Hash node's startup & total costs equal to total cost of input
|
* Set Hash node's startup & total costs equal to total cost of input
|
||||||
@ -5427,9 +5419,7 @@ static Hash *
|
|||||||
make_hash(Plan *lefttree,
|
make_hash(Plan *lefttree,
|
||||||
Oid skewTable,
|
Oid skewTable,
|
||||||
AttrNumber skewColumn,
|
AttrNumber skewColumn,
|
||||||
bool skewInherit,
|
bool skewInherit)
|
||||||
Oid skewColType,
|
|
||||||
int32 skewColTypmod)
|
|
||||||
{
|
{
|
||||||
Hash *node = makeNode(Hash);
|
Hash *node = makeNode(Hash);
|
||||||
Plan *plan = &node->plan;
|
Plan *plan = &node->plan;
|
||||||
@ -5442,8 +5432,6 @@ make_hash(Plan *lefttree,
|
|||||||
node->skewTable = skewTable;
|
node->skewTable = skewTable;
|
||||||
node->skewColumn = skewColumn;
|
node->skewColumn = skewColumn;
|
||||||
node->skewInherit = skewInherit;
|
node->skewInherit = skewInherit;
|
||||||
node->skewColType = skewColType;
|
|
||||||
node->skewColTypmod = skewColTypmod;
|
|
||||||
|
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
@ -858,8 +858,7 @@ typedef struct GatherMerge
|
|||||||
*
|
*
|
||||||
* If the executor is supposed to try to apply skew join optimization, then
|
* If the executor is supposed to try to apply skew join optimization, then
|
||||||
* skewTable/skewColumn/skewInherit identify the outer relation's join key
|
* skewTable/skewColumn/skewInherit identify the outer relation's join key
|
||||||
* column, from which the relevant MCV statistics can be fetched. Also, its
|
* column, from which the relevant MCV statistics can be fetched.
|
||||||
* type information is provided to save a lookup.
|
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
typedef struct Hash
|
typedef struct Hash
|
||||||
@ -868,8 +867,6 @@ typedef struct Hash
|
|||||||
Oid skewTable; /* outer join key's table OID, or InvalidOid */
|
Oid skewTable; /* outer join key's table OID, or InvalidOid */
|
||||||
AttrNumber skewColumn; /* outer join key's column #, or zero */
|
AttrNumber skewColumn; /* outer join key's column #, or zero */
|
||||||
bool skewInherit; /* is outer join rel an inheritance tree? */
|
bool skewInherit; /* is outer join rel an inheritance tree? */
|
||||||
Oid skewColType; /* datatype of the outer key column */
|
|
||||||
int32 skewColTypmod; /* typmod of the outer key column */
|
|
||||||
/* all other info is in the parent HashJoin node */
|
/* all other info is in the parent HashJoin node */
|
||||||
} Hash;
|
} Hash;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user