firtst release
Revision | 306be8ac7ac24591a96abd8415881804e1dfd31f (tree) |
---|---|
Zeit | 2020-10-29 21:20:30 |
Autor | Kyotaro Horiguchi <horikyoga.ntt@gmai...> |
Commiter | Kyotaro Horiguchi |
Update core.c and make_join_rel.c.
From this version core.c and make_join_rel.c are automatically
generated from core code. Adjust them to auto-generated content.
@@ -3,7 +3,6 @@ | ||
3 | 3 | * core.c |
4 | 4 | * Routines copied from PostgreSQL core distribution. |
5 | 5 | * |
6 | - | |
7 | 6 | * The main purpose of this files is having access to static functions in core. |
8 | 7 | * Another purpose is tweaking functions behavior by replacing part of them by |
9 | 8 | * macro definitions. See at the end of pg_hint_plan.c for details. Anyway, |
@@ -13,15 +12,6 @@ | ||
13 | 12 | * |
14 | 13 | * src/backend/optimizer/path/allpaths.c |
15 | 14 | * |
16 | - * static functions: | |
17 | - * set_plain_rel_pathlist() | |
18 | - * create_plain_partial_paths() | |
19 | - * set_append_rel_pathlist() | |
20 | - * add_paths_to_append_rel() | |
21 | - * generate_mergeappend_paths() | |
22 | - * get_cheapest_parameterized_child_path() | |
23 | - * accumulate_append_subpath() | |
24 | - * | |
25 | 15 | * public functions: |
26 | 16 | * standard_join_search(): This funcion is not static. The reason for |
27 | 17 | * including this function is make_rels_by_clause_joins. In order to |
@@ -29,6 +19,14 @@ | ||
29 | 19 | * change the behavior of make_join_rel, which is called under this |
30 | 20 | * function. |
31 | 21 | * |
22 | + * static functions: | |
23 | + * set_plain_rel_pathlist() | |
24 | + * create_plain_partial_paths() | |
25 | + * set_append_rel_pathlist() | |
26 | + * add_paths_to_append_rel() | |
27 | + * generate_mergeappend_paths() | |
28 | + * get_cheapest_parameterized_child_path() | |
29 | + * | |
32 | 30 | * src/backend/optimizer/path/joinrels.c |
33 | 31 | * |
34 | 32 | * public functions: |
@@ -43,13 +41,15 @@ | ||
43 | 41 | * mark_dummy_rel() |
44 | 42 | * restriction_is_constant_false() |
45 | 43 | * |
46 | - * | |
47 | 44 | * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group |
48 | 45 | * Portions Copyright (c) 1994, Regents of the University of California |
49 | 46 | * |
50 | 47 | *------------------------------------------------------------------------- |
51 | 48 | */ |
52 | 49 | |
50 | +static void populate_joinrel_with_paths(PlannerInfo *root, RelOptInfo *rel1, | |
51 | + RelOptInfo *rel2, RelOptInfo *joinrel, | |
52 | + SpecialJoinInfo *sjinfo, List *restrictlist); | |
53 | 53 | |
54 | 54 | /* |
55 | 55 | * set_plain_rel_pathlist |
@@ -164,6 +164,7 @@ set_append_rel_pathlist(PlannerInfo *root, RelOptInfo *rel, | ||
164 | 164 | add_paths_to_append_rel(root, rel, live_childrels); |
165 | 165 | } |
166 | 166 | |
167 | + | |
167 | 168 | /* |
168 | 169 | * add_paths_to_append_rel |
169 | 170 | * Generate paths for given "append" relation given the set of non-dummy |
@@ -5,7 +5,12 @@ | ||
5 | 5 | * modifications. |
6 | 6 | * |
7 | 7 | * src/backend/optimizer/path/joinrels.c |
8 | + * | |
9 | + * This file contains the following functions from corresponding files. | |
10 | + * | |
11 | + * static functions: | |
8 | 12 | * make_join_rel() |
13 | + * populate_joinrel_with_paths() | |
9 | 14 | * |
10 | 15 | * Portions Copyright (c) 2013-2020, NIPPON TELEGRAPH AND TELEPHONE CORPORATION |
11 | 16 | * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group |
@@ -14,10 +19,6 @@ | ||
14 | 19 | *------------------------------------------------------------------------- |
15 | 20 | */ |
16 | 21 | |
17 | -static void populate_joinrel_with_paths(PlannerInfo *root, RelOptInfo *rel1, | |
18 | - RelOptInfo *rel2, RelOptInfo *joinrel, | |
19 | - SpecialJoinInfo *sjinfo, | |
20 | - List *restrictlist); | |
21 | 22 | /* |
22 | 23 | * adjust_rows: tweak estimated row numbers according to the hint. |
23 | 24 | */ |
@@ -48,6 +49,7 @@ adjust_rows(double rows, RowsHint *hint) | ||
48 | 49 | return result; |
49 | 50 | } |
50 | 51 | |
52 | + | |
51 | 53 | /* |
52 | 54 | * make_join_rel |
53 | 55 | * Find or create a join RelOptInfo that represents the join of |
@@ -160,7 +162,7 @@ make_join_rel(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2) | ||
160 | 162 | /* |
161 | 163 | * If the rows_hint's target relids is not a subset of both of |
162 | 164 | * component rels and is a subset of this joinrel, ths hint's |
163 | - * targets spread over both component rels. This means that | |
165 | + * targets spread over both component rels. This menas that | |
164 | 166 | * this hint has been never applied so far and this joinrel is |
165 | 167 | * the first (and only) chance to fire in current join tree. |
166 | 168 | * Only the multiplication hint has the cumulative nature so we |
@@ -174,7 +176,7 @@ make_join_rel(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2) | ||
174 | 176 | { |
175 | 177 | /* |
176 | 178 | * If a hint just for me is found, no other adjust method is |
177 | - * useless, but this cannot be more than twice becuase this joinrel | |
179 | + * useles, but this cannot be more than twice becuase this joinrel | |
178 | 180 | * is already adjusted by this hint. |
179 | 181 | */ |
180 | 182 | if (justforme->base.state == HINT_STATE_NOTUSED) |
@@ -221,6 +223,7 @@ make_join_rel(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2) | ||
221 | 223 | return joinrel; |
222 | 224 | } |
223 | 225 | |
226 | + | |
224 | 227 | /* |
225 | 228 | * populate_joinrel_with_paths |
226 | 229 | * Add paths to the given joinrel for given pair of joining relations. The |