Repository navigation
Parse SQLite's IS and IS NOT operators - #2470
LucaCappelletti94 wants to merge 4 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2470 +/- ##
=======================================
Coverage 81.23% 81.24%
=======================================
Files 42 42
Lines 33891 33919 +28
Branches 33891 33919 +28
=======================================
+ Hits 27533 27559 +26
Misses 2793 2793
- Partials 3565 3567 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
56279d2 to
437a771
Compare
437a771 to
2d8ba04
Compare
sabir-akhadov-localstack
left a comment
There was a problem hiding this comment.
One non-blocking comment inline.
| BinaryOperator::Is | ||
| }; | ||
| // SQLite parses `IS` at the same left-associative level as the | ||
| // comparison operators, see <https://www.sqlite.org/syntax/expr.html> |
There was a problem hiding this comment.
SQLite puts < <= > >= one level above =/IS (lang_expr.html, operator table), so a IS b < c is a IS (b < c) there while this yields (a IS b) < c; sqlite 3.46: SELECT 0 IS 1 < 2 -> 0. Same pre-existing lumping the crate does for a = b < c, so fine to leave, but the comment could say "same level as =" and link lang_expr.html rather than syntax/expr.html, which has no precedence info.
There was a problem hiding this comment.
The comment describes IS and IS NOT at the same precedence level as = and links SQLite’s operator table. The preexisting comparison-precedence limitation is handled separately in #2678.
This PR adds support for SQLite accepts
ISandIS NOTbetween arbitrary expressions. Only SQLite supports them, as far as I can tell.