Skip to content

Commit 313b31a

Browse files
committed
remove useless junkfilters
1 parent add67fa commit 313b31a

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

Diff for: src/hooks.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -967,8 +967,8 @@ pathman_executor_hook(QueryDesc *queryDesc,
967967

968968
if (IsA(state, ModifyTableState))
969969
{
970-
ModifyTableState *mt_state = (ModifyTableState *) state;
971-
int i;
970+
ModifyTableState *mt_state = (ModifyTableState *) state;
971+
int i;
972972

973973
for (i = 0; i < mt_state->mt_nplans; i++)
974974
{
@@ -980,8 +980,8 @@ pathman_executor_hook(QueryDesc *queryDesc,
980980
ResultRelInfo *rri = &mt_state->resultRelInfo[i];
981981

982982
/*
983-
* We unset junkfilter to disable junk
984-
* cleaning in ExecModifyTable.
983+
* HACK: We unset junkfilter to disable
984+
* junk cleaning in ExecModifyTable.
985985
*/
986986
rri->ri_junkFilter = NULL;
987987

Diff for: src/include/partition_filter.h

+2-6
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ typedef struct
4343
Oid partid; /* partition's relid */
4444
ResultRelInfo *result_rel_info; /* cached ResultRelInfo */
4545
TupleConversionMap *tuple_map; /* tuple mapping (parent => child) */
46-
JunkFilter *junkfilter; /* junkfilter for cached ResultRelInfo */
4746
bool has_children; /* hint that it might have children */
4847
ExprState *expr_state; /* children have their own expressions */
4948
} ResultRelInfoHolder;
@@ -107,15 +106,12 @@ typedef struct
107106

108107
Plan *subplan; /* proxy variable to store subplan */
109108
ResultPartsStorage result_parts; /* partition ResultRelInfo cache */
109+
CmdType command_type;
110110

111111
bool warning_triggered; /* warning message counter */
112112

113-
TupleTableSlot *tup_convert_slot; /* slot for rebuilt tuples */
114-
CmdType command_type;
115-
116113
TupleTableSlot *subplan_slot; /* slot that was returned from subplan */
117-
JunkFilter *junkfilter; /* junkfilter for subplan_slot */
118-
114+
TupleTableSlot *tup_convert_slot; /* slot for rebuilt tuples */
119115
ExprContext *tup_convert_econtext; /* ExprContext for projections */
120116
} PartitionFilterState;
121117

0 commit comments

Comments
 (0)