Commit 7d87976
authored
Avoid the need to rewrite expressions when evaluating logical case nullability (#18849)
## Which issue does this PR close?
- None, follow up to PR #17813
## Rationale for this change
In #17813, the when expressions are rewritten using `GuaranteesRewrite`
before evaluating their bounds. This PR avoids the rewrite cost by
inlining the special case of `GuaranteesRewrite` with a single `Null`
guarantee into the `PredicateBounds::evaluate_bounds` logic.
## What changes are included in this PR?
Inlines guarantee rewriting into predicate bounds evaluation.
## Are these changes tested?
Covered by existing tests
## Are there any user-facing changes?
No1 parent e50b939 commit 7d87976
2 files changed
+21
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
37 | | - | |
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
| |||
307 | 305 | | |
308 | 306 | | |
309 | 307 | | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | 308 | | |
332 | | - | |
| 309 | + | |
| 310 | + | |
333 | 311 | | |
334 | 312 | | |
335 | 313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
54 | 58 | | |
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
| 63 | + | |
59 | 64 | | |
60 | 65 | | |
61 | 66 | | |
| |||
165 | 170 | | |
166 | 171 | | |
167 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
168 | 180 | | |
169 | 181 | | |
170 | 182 | | |
| |||
237 | 249 | | |
238 | 250 | | |
239 | 251 | | |
240 | | - | |
| 252 | + | |
241 | 253 | | |
242 | 254 | | |
243 | 255 | | |
| |||
467 | 479 | | |
468 | 480 | | |
469 | 481 | | |
470 | | - | |
| 482 | + | |
471 | 483 | | |
472 | 484 | | |
473 | 485 | | |
| |||
543 | 555 | | |
544 | 556 | | |
545 | 557 | | |
546 | | - | |
| 558 | + | |
547 | 559 | | |
548 | 560 | | |
549 | 561 | | |
550 | 562 | | |
551 | 563 | | |
552 | 564 | | |
553 | | - | |
| 565 | + | |
554 | 566 | | |
555 | 567 | | |
556 | 568 | | |
| |||
623 | 635 | | |
624 | 636 | | |
625 | 637 | | |
626 | | - | |
| 638 | + | |
627 | 639 | | |
628 | 640 | | |
629 | 641 | | |
630 | 642 | | |
631 | 643 | | |
632 | 644 | | |
633 | | - | |
| 645 | + | |
634 | 646 | | |
635 | 647 | | |
636 | 648 | | |
| |||
0 commit comments