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

Commit8514324

Browse files
committed
Clean code, fix dead assignments & some other inconsistencies
1 parentda48f47 commit8514324

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

‎nodes_common.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ unpack_pickyappend_private(PickyAppendState *scan_state, CustomScan *cscan)
180180
ListCell*plan_cell;
181181
List*custom_oids= (List*)lsecond(cscan->custom_private);
182182
intnchildren=list_length(custom_oids);
183-
HTAB*children_table=scan_state->children_table;
183+
HTAB*children_table;
184184
HASHCTL*children_table_config=&scan_state->children_table_config;
185185
inti;
186186

@@ -276,9 +276,9 @@ create_append_path_common(PlannerInfo *root,
276276
}
277277

278278
Plan*
279-
create_append_plan_common(PlannerInfo*root,RelOptInfo*rel,
280-
CustomPath*best_path,List*tlist,
281-
List*clauses,List*custom_plans,
279+
create_append_plan_common(PlannerInfo*root,RelOptInfo*rel,
280+
CustomPath*best_path,List*tlist,
281+
List*clauses,List*custom_plans,
282282
CustomScanMethods*scan_methods)
283283
{
284284
PickyAppendPath*gpath= (PickyAppendPath*)best_path;
@@ -301,7 +301,7 @@ create_append_plan_common(PlannerInfo* root, RelOptInfo* rel,
301301
}
302302

303303
Node*
304-
create_append_scan_state_common(CustomScan*node,
304+
create_append_scan_state_common(CustomScan*node,
305305
CustomExecMethods*exec_methods,
306306
uint32size)
307307
{
@@ -329,7 +329,7 @@ void
329329
begin_append_common(CustomScanState*node,EState*estate,inteflags)
330330
{
331331
PickyAppendState*scan_state= (PickyAppendState*)node;
332-
HTAB*plan_state_table=scan_state->plan_state_table;
332+
HTAB*plan_state_table;
333333
HASHCTL*plan_state_table_config=&scan_state->plan_state_table_config;
334334

335335
memset(plan_state_table_config,0,sizeof(HASHCTL));
@@ -341,8 +341,9 @@ begin_append_common(CustomScanState *node, EState *estate, int eflags)
341341
HASH_ELEM |HASH_BLOBS);
342342

343343
scan_state->plan_state_table=plan_state_table;
344-
scan_state->custom_expr_states= (List*)ExecInitExpr((Expr*)scan_state->custom_exprs,
345-
(PlanState*)scan_state);
344+
scan_state->custom_expr_states=
345+
(List*)ExecInitExpr((Expr*)scan_state->custom_exprs,
346+
(PlanState*)scan_state);
346347
}
347348

348349
void
@@ -399,10 +400,8 @@ rescan_append_common(CustomScanState *node)
399400
}
400401

401402
void
402-
explain_append_common(CustomScanState*node,HTAB*children_table,ExplainState*es)
403+
explain_append_common(CustomScanState*node,HTAB*children_table,ExplainState*es)
403404
{
404-
PickyAppendState*scan_state= (PickyAppendState*)node;
405-
406405
/* Construct excess PlanStates */
407406
if (!es->analyze)
408407
{
@@ -416,7 +415,8 @@ explain_append_common(CustomScanState *node, HTAB* children_table, ExplainState
416415
/* There can't be any nodes since we're not scanning anything */
417416
Assert(!node->custom_ps);
418417

419-
hash_seq_init(&seqstat,scan_state->children_table);
418+
/* Iterate through node's ChildScanCommon table */
419+
hash_seq_init(&seqstat,children_table);
420420

421421
while ((child= (ChildScanCommon)hash_seq_search(&seqstat)))
422422
{
@@ -438,7 +438,7 @@ explain_append_common(CustomScanState *node, HTAB* children_table, ExplainState
438438

439439
/*
440440
* These PlanStates will be used by EXPLAIN,
441-
*pickyappend_end will destroy them eventually
441+
*end_append_common will destroy them eventually
442442
*/
443443
for (i=0;i<used;i++)
444444
node->custom_ps=lappend(node->custom_ps,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp