Repository navigation
Commit 803f23d
Reject out-of-range literals when binding IN / NOT IN
`SetPredicate.bind` kept the result of `Literal.to(field_type)` for every
literal. For a value outside the field's range that result is the
`AboveMax`/`BelowMin` sentinel, whose value is the type's max/min, so the
bound set held a literal the user never wrote.
On an `int` column, `id in (1, 2**40)` matched rows where `id` equals
2147483647, and the `not in` form dropped them. `LiteralPredicate.bind`
already folds these to `AlwaysTrue`/`AlwaysFalse`, and Java's
`bindInOperation` filters them out of the set; do the same here. An empty
set after filtering is already folded by `BoundIn`/`BoundNotIn`.
Co-Authored-By: Claude Code <noreply@anthropic.com>1 parent 7a7a99b commit 803f23d
2 files changed
Lines changed: 37 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
697 | 697 | | |
698 | 698 | | |
699 | 699 | | |
700 | | - | |
701 | | - | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
702 | 707 | | |
703 | 708 | | |
704 | 709 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
| 56 | + | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
| |||
1907 | 1910 | | |
1908 | 1911 | | |
1909 | 1912 | | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
0 commit comments