- Notifications
You must be signed in to change notification settings - Fork5
Commit7920ed3
committed
Simplify overcomplicated (and overly restrictive) test to see whether an
IS NULL condition is rendered redundant by detection of an antijoin.If we know that a join is an antijoin, then *any* Var coming out of itsrighthand side must be NULL, not only the joining column(s). Also,it's still gonna be null after being passed up through higher joins,whether they're outer joins or not. I was misled by a faulty analogyto reduce_outer_joins() in the original coding. But considerselect * from a left join b on a.x = b.y where b.y is null and b.z is null;The first IS NULL condition justifies deciding that the join is an antijoin(if the = is strict) and then the second one is just plain redundant.1 parent233b8a9 commit7920ed3
1 file changed
+8
-34
lines changedLines changed: 8 additions & 34 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
725 | 725 |
| |
726 | 726 |
| |
727 | 727 |
| |
| 728 | + | |
| 729 | + | |
| 730 | + | |
728 | 731 |
| |
729 | 732 |
| |
730 | 733 |
| |
| |||
1209 | 1212 |
| |
1210 | 1213 |
| |
1211 | 1214 |
| |
1212 |
| - | |
1213 | 1215 |
| |
1214 | 1216 |
| |
1215 | 1217 |
| |
| |||
1219 | 1221 |
| |
1220 | 1222 |
| |
1221 | 1223 |
| |
1222 |
| - | |
1223 |
| - | |
1224 |
| - | |
1225 |
| - | |
1226 |
| - | |
1227 |
| - | |
1228 |
| - | |
1229 |
| - | |
| 1224 | + | |
| 1225 | + | |
1230 | 1226 |
| |
1231 | 1227 |
| |
1232 | 1228 |
| |
1233 | 1229 |
| |
1234 | 1230 |
| |
1235 |
| - | |
1236 | 1231 |
| |
1237 | 1232 |
| |
1238 |
| - | |
1239 |
| - | |
1240 |
| - | |
1241 |
| - | |
1242 |
| - | |
1243 |
| - | |
1244 |
| - | |
1245 |
| - | |
1246 |
| - | |
1247 |
| - | |
1248 |
| - | |
1249 |
| - | |
1250 |
| - | |
1251 |
| - | |
1252 |
| - | |
1253 |
| - | |
1254 |
| - | |
1255 |
| - | |
1256 |
| - | |
1257 |
| - | |
1258 |
| - | |
1259 |
| - | |
| 1233 | + | |
1260 | 1234 |
| |
1261 | 1235 |
| |
1262 |
| - | |
| 1236 | + | |
1263 | 1237 |
| |
1264 | 1238 |
| |
1265 | 1239 |
| |
|
0 commit comments
Comments
(0)