Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3086 +/- ##
=======================================
Coverage 83.64% 83.65%
=======================================
Files 42 42
Lines 35833 35841 +8
Branches 35833 35841 +8
=======================================
+ Hits 29974 29982 +8
Misses 2418 2418
Partials 3441 3441 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
LucaCappelletti94
requested changes
Dec 1, 2026
| .parse_sql_statements("SELECT id FROM t WHERE id ^ = 1") | ||
| .unwrap_err() | ||
| .to_string(), | ||
| "sql parser error: Expected: an expression, found: =" |
Contributor
There was a problem hiding this comment.
Use typed errors instead of the to_string, likely you can also drop the unwrap_err
Contributor
Author
There was a problem hiding this comment.
Done: both negative tests now compare against Err(ParserError::ParserError(...)) directly, no unwrap_err/to_string.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dialects: Oracle
SELECT 1 FROM dual WHERE (1,2) ^= ((1,3))currently fails with:Expected: an expression, found: = at Line: 1, Column: 33Oracle accepts
^=as an alternate spelling of the not-equal operator, alongside!=and<>.Syntax reference: https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/Comparison-Conditions.html
This PR adds
Dialect::supports_caret_not_equal()(defaultfalse,trueforOracleDialect). When enabled, the tokenizer emits the existingToken::Neqfor a contiguous^=, so it parses asBinaryOperator::NotEqand displays as<>. No AST changes. Other dialects are unaffected, and^ =with whitespace is still rejected.Tests in
tests/sqlparser_oracle.rscover the AST shape, display normalization (^=→<>) for scalar, tuple, andCASEusages, and exact error messages for the non-contiguous form and for dialects without support.Fuzzed with
fuzz_parse_sqlandfuzz_parse_roundtripfor 60 seconds each, no panics. Seed:fuzz/fuzz_seeds/oracle_caret_not_equal.sql.This PR was written with AI assistance (Claude Code). I reviewed every line and can explain each change.
🤖 Generated with Claude Code