- Notifications
You must be signed in to change notification settings - Fork28
Commitcc5e80b
committed
Teach planner about some cases where a restriction clause can be
propagated inside an outer join. In particular, givenLEFT JOIN ON (A = B) WHERE A = constant, we cannot conclude thatB = constant at the top level (B might be null instead), but wecan nonetheless put a restriction B = constant into the quals forB's relation, since no inner-side rows not meeting that conditioncan contribute to the final result. Similarly, givenFULL JOIN USING (J) WHERE J = constant, we can't directly concludethat either input J variable = constant, but it's OK to push suchquals into each input rel. Per recent gripe from Kim Bisgaard.Along the way, remove 'valid_everywhere' flag from RestrictInfo,as on closer analysis it was not being used for anything, and wasdefined backwards anyway.1 parentea1e2b9 commitcc5e80b
File tree
13 files changed
+424
-114
lines changed- src
- backend
- nodes
- optimizer
- path
- plan
- util
- include
- nodes
- optimizer
13 files changed
+424
-114
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
1249 | 1249 | | |
1250 | 1250 | | |
1251 | 1251 | | |
1252 | | - | |
1253 | 1252 | | |
1254 | 1253 | | |
1255 | 1254 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
603 | 603 | | |
604 | 604 | | |
605 | 605 | | |
606 | | - | |
607 | 606 | | |
608 | 607 | | |
609 | 608 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
1164 | 1164 | | |
1165 | 1165 | | |
1166 | 1166 | | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
1167 | 1170 | | |
1168 | 1171 | | |
1169 | 1172 | | |
| 1173 | + | |
1170 | 1174 | | |
1171 | 1175 | | |
1172 | 1176 | | |
| |||
1234 | 1238 | | |
1235 | 1239 | | |
1236 | 1240 | | |
1237 | | - | |
1238 | 1241 | | |
1239 | 1242 | | |
1240 | 1243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
1882 | 1882 | | |
1883 | 1883 | | |
1884 | 1884 | | |
1885 | | - | |
| 1885 | + | |
1886 | 1886 | | |
1887 | 1887 | | |
1888 | 1888 | | |
| |||
2132 | 2132 | | |
2133 | 2133 | | |
2134 | 2134 | | |
2135 | | - | |
| 2135 | + | |
2136 | 2136 | | |
2137 | 2137 | | |
2138 | 2138 | | |
| |||
2147 | 2147 | | |
2148 | 2148 | | |
2149 | 2149 | | |
2150 | | - | |
| 2150 | + | |
2151 | 2151 | | |
2152 | 2152 | | |
2153 | 2153 | | |
| |||
2163 | 2163 | | |
2164 | 2164 | | |
2165 | 2165 | | |
2166 | | - | |
| 2166 | + | |
2167 | 2167 | | |
2168 | 2168 | | |
2169 | 2169 | | |
| |||
2234 | 2234 | | |
2235 | 2235 | | |
2236 | 2236 | | |
2237 | | - | |
| 2237 | + | |
2238 | 2238 | | |
2239 | 2239 | | |
2240 | 2240 | | |
| |||
2249 | 2249 | | |
2250 | 2250 | | |
2251 | 2251 | | |
2252 | | - | |
| 2252 | + | |
2253 | 2253 | | |
2254 | 2254 | | |
2255 | 2255 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
94 | | - | |
95 | | - | |
| 93 | + | |
96 | 94 | | |
97 | 95 | | |
98 | 96 | | |
99 | 97 | | |
100 | 98 | | |
101 | | - | |
102 | | - | |
| 99 | + | |
103 | 100 | | |
104 | 101 | | |
105 | 102 | | |
| |||
140 | 137 | | |
141 | 138 | | |
142 | 139 | | |
143 | | - | |
144 | | - | |
| 140 | + | |
145 | 141 | | |
146 | 142 | | |
147 | 143 | | |
| |||
0 commit comments
Comments
(0)