Commit cd60f33
committed
opt: do not generic placeholder scans with stable functions
In v25.4.0 we introduced an optimization for some types of generic query
plans which converts parameterized lookup joins into placeholder scans.
Prior to this commit the spans of these placeholder scans could contain
scalar expressions that were not constants nor placeholders, which
execbuilder does not support. This has been fixed by being more strict
in the application of this rule.
Fixes #159124
Release note (bug fix): A bug has been fixed which could cause prepared
statements to fail with the error message "non-const expression" when
they contained filters with stable functions. This bug has been present
since 25.4.0.1 parent 86ca2bd commit cd60f33
File tree
4 files changed
+73
-18
lines changed- pkg/sql
- logictest/testdata/logic_test
- opt/xform
- rules
- testdata/rules
4 files changed
+73
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
690 | 690 | | |
691 | 691 | | |
692 | 692 | | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
32 | 45 | | |
33 | 46 | | |
34 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
460 | 455 | | |
461 | 456 | | |
462 | 457 | | |
| |||
536 | 531 | | |
537 | 532 | | |
538 | 533 | | |
539 | | - | |
| 534 | + | |
540 | 535 | | |
541 | 536 | | |
542 | 537 | | |
543 | 538 | | |
544 | | - | |
545 | | - | |
546 | | - | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
547 | 555 | | |
548 | 556 | | |
549 | 557 | | |
| |||
846 | 854 | | |
847 | 855 | | |
848 | 856 | | |
849 | | - | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
850 | 860 | | |
851 | 861 | | |
852 | | - | |
| 862 | + | |
853 | 863 | | |
854 | 864 | | |
855 | 865 | | |
856 | 866 | | |
857 | 867 | | |
858 | | - | |
859 | | - | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
860 | 884 | | |
861 | 885 | | |
862 | 886 | | |
| |||
0 commit comments