|
19 | 19 | #include "nodes/nodeFuncs.h"
|
20 | 20 | #include "optimizer/optimizer.h"
|
21 | 21 | #include "optimizer/orclauses.h"
|
| 22 | +#include "optimizer/paths.h" |
22 | 23 | #include "optimizer/restrictinfo.h"
|
23 | 24 |
|
24 | 25 |
|
@@ -325,24 +326,10 @@ consider_new_or_clause(PlannerInfo *root, RelOptInfo *rel,
|
325 | 326 | * Make up a SpecialJoinInfo for JOIN_INNER semantics. (Compare
|
326 | 327 | * approx_tuple_count() in costsize.c.)
|
327 | 328 | */
|
328 |
| - sjinfo.type = T_SpecialJoinInfo; |
329 |
| - sjinfo.min_lefthand = bms_difference(join_or_rinfo->clause_relids, |
330 |
| - rel->relids); |
331 |
| - sjinfo.min_righthand = rel->relids; |
332 |
| - sjinfo.syn_lefthand = sjinfo.min_lefthand; |
333 |
| - sjinfo.syn_righthand = sjinfo.min_righthand; |
334 |
| - sjinfo.jointype = JOIN_INNER; |
335 |
| - sjinfo.ojrelid = 0; |
336 |
| - sjinfo.commute_above_l = NULL; |
337 |
| - sjinfo.commute_above_r = NULL; |
338 |
| - sjinfo.commute_below_l = NULL; |
339 |
| - sjinfo.commute_below_r = NULL; |
340 |
| - /* we don't bother trying to make the remaining fields valid */ |
341 |
| - sjinfo.lhs_strict = false; |
342 |
| - sjinfo.semi_can_btree = false; |
343 |
| - sjinfo.semi_can_hash = false; |
344 |
| - sjinfo.semi_operators = NIL; |
345 |
| - sjinfo.semi_rhs_exprs = NIL; |
| 329 | + init_dummy_sjinfo(&sjinfo, |
| 330 | + bms_difference(join_or_rinfo->clause_relids, |
| 331 | + rel->relids), |
| 332 | + rel->relids); |
346 | 333 |
|
347 | 334 | /* Compute inner-join size */
|
348 | 335 | orig_selec = clause_selectivity(root, (Node *) join_or_rinfo,
|
|
0 commit comments