v2-0001-Improve-left-deep-tree-dp-algorithm-s-readability.patch
application/octet-stream
Filename: v2-0001-Improve-left-deep-tree-dp-algorithm-s-readability.patch
Type: application/octet-stream
Part: 0
Patch
Format: format-patch
Series: patch v2-0001
Subject: Improve left deep tree dp algorithm's readability
| File | + | − |
|---|---|---|
| src/backend/optimizer/path/joinrels.c | 2 | 2 |
From 5b038577cf4f8acdc094d6e41d3891b559016cae Mon Sep 17 00:00:00 2001
From: DouEnergy <douenergy@protonmail.com>
Date: Tue, 6 Jun 2023 15:30:14 +0800
Subject: [PATCH v2] Improve left deep tree dp algorithm's readability
---
src/backend/optimizer/path/joinrels.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/optimizer/path/joinrels.c b/src/backend/optimizer/path/joinrels.c
index 2feab2184f..a283e574f3 100644
--- a/src/backend/optimizer/path/joinrels.c
+++ b/src/backend/optimizer/path/joinrels.c
@@ -109,14 +109,14 @@ join_search_one_level(PlannerInfo *root, int level)
List *other_rels_list;
ListCell *other_rels;
+ other_rels_list = joinrels[1];
+
if (level == 2) /* consider remaining initial rels */
{
- other_rels_list = joinrels[level - 1];
other_rels = lnext(other_rels_list, r);
}
else /* consider all initial rels */
{
- other_rels_list = joinrels[1];
other_rels = list_head(other_rels_list);
}
--
2.37.1 (Apple Git-137.1)