10
10
#include "postgres.h"
11
11
#include "optimizer/paths.h"
12
12
#include "nodes_common.h"
13
- #include "pickyappend .h"
13
+ #include "runtimeappend .h"
14
14
15
15
16
16
@@ -46,7 +46,7 @@ free_child_scan_common_array(ChildScanCommon *cur_plans, int n)
46
46
}
47
47
48
48
static void
49
- transform_plans_into_states (PickyAppendState * scan_state ,
49
+ transform_plans_into_states (RuntimeAppendState * scan_state ,
50
50
ChildScanCommon * selected_plans , int n ,
51
51
EState * estate )
52
52
{
@@ -152,7 +152,7 @@ get_partition_oids(List *ranges, int *n, PartRelationInfo *prel)
152
152
}
153
153
154
154
static void
155
- pack_pickyappend_private (CustomScan * cscan , PickyAppendPath * path )
155
+ pack_runtimeappend_private (CustomScan * cscan , RuntimeAppendPath * path )
156
156
{
157
157
ChildScanCommon * children = path -> children ;
158
158
int nchildren = path -> nchildren ;
@@ -162,7 +162,7 @@ pack_pickyappend_private(CustomScan *cscan, PickyAppendPath *path)
162
162
163
163
for (i = 0 ; i < nchildren ; i ++ )
164
164
{
165
- /* We've already filled 'custom_paths' in create_pickyappend_path */
165
+ /* We've already filled 'custom_paths' in create_runtimeappend_path */
166
166
custom_oids = lappend_oid (custom_oids , children [i ]-> relid );
167
167
pfree (children [i ]);
168
168
}
@@ -174,7 +174,7 @@ pack_pickyappend_private(CustomScan *cscan, PickyAppendPath *path)
174
174
}
175
175
176
176
static void
177
- unpack_pickyappend_private ( PickyAppendState * scan_state , CustomScan * cscan )
177
+ unpack_runtimeappend_private ( RuntimeAppendState * scan_state , CustomScan * cscan )
178
178
{
179
179
ListCell * oid_cell ;
180
180
ListCell * plan_cell ;
@@ -216,19 +216,19 @@ Path *
216
216
create_append_path_common (PlannerInfo * root ,
217
217
AppendPath * inner_append ,
218
218
ParamPathInfo * param_info ,
219
- List * picky_clauses ,
219
+ List * runtime_clauses ,
220
220
CustomPathMethods * path_methods ,
221
221
double sel )
222
222
{
223
- RelOptInfo * innerrel = inner_append -> path .parent ;
224
- ListCell * lc ;
225
- int i ;
223
+ RelOptInfo * innerrel = inner_append -> path .parent ;
224
+ ListCell * lc ;
225
+ int i ;
226
226
227
- RangeTblEntry * inner_entry = root -> simple_rte_array [innerrel -> relid ];
227
+ RangeTblEntry * inner_entry = root -> simple_rte_array [innerrel -> relid ];
228
228
229
- PickyAppendPath * result ;
229
+ RuntimeAppendPath * result ;
230
230
231
- result = palloc0 (sizeof (PickyAppendPath ));
231
+ result = palloc0 (sizeof (RuntimeAppendPath ));
232
232
NodeSetTag (result , T_CustomPath );
233
233
234
234
result -> cpath .path .pathtype = T_CustomScan ;
@@ -247,7 +247,7 @@ create_append_path_common(PlannerInfo *root,
247
247
result -> cpath .path .total_cost = 0.0 ;
248
248
249
249
/* Set 'partitioned column'-related clauses */
250
- result -> cpath .custom_private = picky_clauses ;
250
+ result -> cpath .custom_private = runtime_clauses ;
251
251
result -> cpath .custom_paths = NIL ;
252
252
253
253
Assert (inner_entry -> relid != 0 );
@@ -258,9 +258,9 @@ create_append_path_common(PlannerInfo *root,
258
258
i = 0 ;
259
259
foreach (lc , inner_append -> subpaths )
260
260
{
261
- Path * path = lfirst (lc );
262
- Index relindex = path -> parent -> relid ;
263
- ChildScanCommon child = palloc (sizeof (ChildScanCommonData ));
261
+ Path * path = lfirst (lc );
262
+ Index relindex = path -> parent -> relid ;
263
+ ChildScanCommon child = palloc (sizeof (ChildScanCommonData ));
264
264
265
265
result -> cpath .path .startup_cost += path -> startup_cost ;
266
266
result -> cpath .path .total_cost += path -> total_cost ;
@@ -288,7 +288,7 @@ create_append_plan_common(PlannerInfo *root, RelOptInfo *rel,
288
288
List * clauses , List * custom_plans ,
289
289
CustomScanMethods * scan_methods )
290
290
{
291
- PickyAppendPath * gpath = (PickyAppendPath * ) best_path ;
291
+ RuntimeAppendPath * gpath = (RuntimeAppendPath * ) best_path ;
292
292
CustomScan * cscan ;
293
293
294
294
cscan = makeNode (CustomScan );
@@ -302,7 +302,7 @@ create_append_plan_common(PlannerInfo *root, RelOptInfo *rel,
302
302
303
303
cscan -> methods = scan_methods ;
304
304
305
- pack_pickyappend_private (cscan , gpath );
305
+ pack_runtimeappend_private (cscan , gpath );
306
306
307
307
return & cscan -> scan .plan ;
308
308
}
@@ -312,14 +312,14 @@ create_append_scan_state_common(CustomScan *node,
312
312
CustomExecMethods * exec_methods ,
313
313
uint32 size )
314
314
{
315
- PickyAppendState * scan_state = palloc0 (size );
315
+ RuntimeAppendState * scan_state = palloc0 (size );
316
316
317
317
NodeSetTag (scan_state , T_CustomScanState );
318
318
scan_state -> css .flags = node -> flags ;
319
319
scan_state -> css .methods = exec_methods ;
320
320
scan_state -> custom_exprs = node -> custom_exprs ;
321
321
322
- unpack_pickyappend_private (scan_state , node );
322
+ unpack_runtimeappend_private (scan_state , node );
323
323
324
324
/* Fill in relation info using main table's relid */
325
325
scan_state -> prel = get_pathman_relation_info (scan_state -> relid , NULL );
@@ -335,7 +335,7 @@ create_append_scan_state_common(CustomScan *node,
335
335
void
336
336
begin_append_common (CustomScanState * node , EState * estate , int eflags )
337
337
{
338
- PickyAppendState * scan_state = (PickyAppendState * ) node ;
338
+ RuntimeAppendState * scan_state = (RuntimeAppendState * ) node ;
339
339
HTAB * plan_state_table ;
340
340
HASHCTL * plan_state_table_config = & scan_state -> plan_state_table_config ;
341
341
@@ -356,7 +356,7 @@ begin_append_common(CustomScanState *node, EState *estate, int eflags)
356
356
void
357
357
end_append_common (CustomScanState * node )
358
358
{
359
- PickyAppendState * scan_state = (PickyAppendState * ) node ;
359
+ RuntimeAppendState * scan_state = (RuntimeAppendState * ) node ;
360
360
361
361
clear_plan_states (& scan_state -> css );
362
362
hash_destroy (scan_state -> plan_state_table );
@@ -366,7 +366,7 @@ end_append_common(CustomScanState *node)
366
366
void
367
367
rescan_append_common (CustomScanState * node )
368
368
{
369
- PickyAppendState * scan_state = (PickyAppendState * ) node ;
369
+ RuntimeAppendState * scan_state = (RuntimeAppendState * ) node ;
370
370
ExprContext * econtext = node -> ss .ps .ps_ExprContext ;
371
371
PartRelationInfo * prel = scan_state -> prel ;
372
372
List * ranges ;
0 commit comments