Commit ef12bb0
Fix BETWEEN optimization never triggering due to span comparison
The try_into_between function compared rq::Expr values including their
span field. Since the same column referenced at two source positions
has different spans, the equality check always failed, making the
BETWEEN optimization dead code.
Fix by comparing only the kind field (a_l.kind == b_l.kind) instead of
the full Expr (a_l == b_l).
Fixes #5737
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent f55952a commit ef12bb0
2 files changed
+19
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
435 | | - | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
436 | 438 | | |
437 | 439 | | |
438 | 440 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
451 | 451 | | |
452 | 452 | | |
453 | 453 | | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
454 | 470 | | |
455 | 471 | | |
456 | 472 | | |
| |||
0 commit comments