OSDN Git Service

Support PostgreSQL 14
[pghintplan/pg_hint_plan.git] / make_join_rel.c
index 9bc9e1c..638e500 100644 (file)
@@ -5,7 +5,12 @@
  *       modifications.
  *
  * src/backend/optimizer/path/joinrels.c
+ *
+ * This file contains the following functions from corresponding files.
+ *
+ *     static functions:
  *     make_join_rel()
+ *     populate_joinrel_with_paths()
  *
  * Portions Copyright (c) 2013-2020, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
  * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
@@ -44,6 +49,7 @@ adjust_rows(double rows, RowsHint *hint)
        return result;
 }
 
+
 /*
  * make_join_rel
  *        Find or create a join RelOptInfo that represents the join of
@@ -120,7 +126,7 @@ make_join_rel(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2)
        joinrel = build_join_rel(root, joinrelids, rel1, rel2, sjinfo,
                                                         &restrictlist);
 
-       /* !!! START: HERE IS THE PART WHICH ADDED FOR PG_HINT_PLAN !!! */
+       /* !!! START: HERE IS THE PART WHICH IS ADDED FOR PG_HINT_PLAN !!! */
        {
                RowsHint   *rows_hint = NULL;
                int                     i;
@@ -156,7 +162,7 @@ make_join_rel(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2)
                                /*
                                 * If the rows_hint's target relids is not a subset of both of
                                 * component rels and is a subset of this joinrel, ths hint's
-                                * targets spread over both component rels. This means that
+                                * targets spread over both component rels. This menas that
                                 * this hint has been never applied so far and this joinrel is
                                 * the first (and only) chance to fire in current join tree.
                                 * Only the multiplication hint has the cumulative nature so we
@@ -170,7 +176,7 @@ make_join_rel(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2)
                {
                        /*
                         * If a hint just for me is found, no other adjust method is
-                        * useless, but this cannot be more than twice becuase this joinrel
+                        * useles, but this cannot be more than twice becuase this joinrel
                         * is already adjusted by this hint.
                         */
                        if (justforme->base.state == HINT_STATE_NOTUSED)
@@ -196,7 +202,7 @@ make_join_rel(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2)
                        
                }
        }
-       /* !!! END: HERE IS THE PART WHICH ADDED FOR PG_HINT_PLAN !!! */
+       /* !!! END: HERE IS THE PART WHICH IS ADDED FOR PG_HINT_PLAN !!! */
 
        /*
         * If we've already proven this join is empty, we needn't consider any
@@ -217,6 +223,7 @@ make_join_rel(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2)
        return joinrel;
 }
 
+
 /*
  * populate_joinrel_with_paths
  *       Add paths to the given joinrel for given pair of joining relations. The