Commit f6747434 authored by Tom Lane's avatar Tom Lane

Remove no-longer-needed fields of Hash plan nodes.

skewColType/skewColTypmod are no longer used in the wake of commit
9aab83fc, and seem unlikely to be wanted in future, so let's drop 'em.

Discussion: https://postgr.es/m/16364.1494520862@sss.pgh.pa.us
parent f04c9a61
......@@ -1052,8 +1052,6 @@ _copyHash(const Hash *from)
COPY_SCALAR_FIELD(skewTable);
COPY_SCALAR_FIELD(skewColumn);
COPY_SCALAR_FIELD(skewInherit);
COPY_SCALAR_FIELD(skewColType);
COPY_SCALAR_FIELD(skewColTypmod);
return newnode;
}
......
......@@ -898,8 +898,6 @@ _outHash(StringInfo str, const Hash *node)
WRITE_OID_FIELD(skewTable);
WRITE_INT_FIELD(skewColumn);
WRITE_BOOL_FIELD(skewInherit);
WRITE_OID_FIELD(skewColType);
WRITE_INT_FIELD(skewColTypmod);
}
static void
......
......@@ -2187,8 +2187,6 @@ _readHash(void)
READ_OID_FIELD(skewTable);
READ_INT_FIELD(skewColumn);
READ_BOOL_FIELD(skewInherit);
READ_OID_FIELD(skewColType);
READ_INT_FIELD(skewColTypmod);
READ_DONE();
}
......
......@@ -224,9 +224,7 @@ static HashJoin *make_hashjoin(List *tlist,
static Hash *make_hash(Plan *lefttree,
Oid skewTable,
AttrNumber skewColumn,
bool skewInherit,
Oid skewColType,
int32 skewColTypmod);
bool skewInherit);
static MergeJoin *make_mergejoin(List *tlist,
List *joinclauses, List *otherclauses,
List *mergeclauses,
......@@ -4065,8 +4063,6 @@ create_hashjoin_plan(PlannerInfo *root,
Oid skewTable = InvalidOid;
AttrNumber skewColumn = InvalidAttrNumber;
bool skewInherit = false;
Oid skewColType = InvalidOid;
int32 skewColTypmod = -1;
/*
* 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;
skewColumn = var->varattno;
skewInherit = rte->inh;
skewColType = var->vartype;
skewColTypmod = var->vartypmod;
}
}
}
......@@ -4165,9 +4159,7 @@ create_hashjoin_plan(PlannerInfo *root,
hash_plan = make_hash(inner_plan,
skewTable,
skewColumn,
skewInherit,
skewColType,
skewColTypmod);
skewInherit);
/*
* Set Hash node's startup & total costs equal to total cost of input
......@@ -5427,9 +5419,7 @@ static Hash *
make_hash(Plan *lefttree,
Oid skewTable,
AttrNumber skewColumn,
bool skewInherit,
Oid skewColType,
int32 skewColTypmod)
bool skewInherit)
{
Hash *node = makeNode(Hash);
Plan *plan = &node->plan;
......@@ -5442,8 +5432,6 @@ make_hash(Plan *lefttree,
node->skewTable = skewTable;
node->skewColumn = skewColumn;
node->skewInherit = skewInherit;
node->skewColType = skewColType;
node->skewColTypmod = skewColTypmod;
return node;
}
......
......@@ -858,8 +858,7 @@ typedef struct GatherMerge
*
* If the executor is supposed to try to apply skew join optimization, then
* skewTable/skewColumn/skewInherit identify the outer relation's join key
* column, from which the relevant MCV statistics can be fetched. Also, its
* type information is provided to save a lookup.
* column, from which the relevant MCV statistics can be fetched.
* ----------------
*/
typedef struct Hash
......@@ -868,8 +867,6 @@ typedef struct Hash
Oid skewTable; /* outer join key's table OID, or InvalidOid */
AttrNumber skewColumn; /* outer join key's column #, or zero */
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 */
} Hash;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment