Repository navigation
fix: match JOIN ON parser error with location suffix in whitelist - #15
Open
createcentury wants to merge 1 commit into
Open
createcentury wants to merge 1 commit into
createcentury wants to merge 1 commit into
Conversation
Newer sqlparser versions append the error location, e.g. `found: ON at Line: 3, Column: 17`, so the existing `Contains` pattern no longer matched and expected errors from `NATURAL JOIN ... ON` were reported as non-whitelisted. Switch to a regex that accepts both forms. 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.
Summary
Follow-up to #14. While testing that PR, the fuzzer reported one non-whitelisted error on both
mainand the PR branch. The error is expected: the fuzzer occasionally adds anONclause toNATURAL JOIN/CROSS JOINon purpose.The cause is that the DataFusion 54 parser error now includes the location:
Changes
src/cli/error_whitelist.rs: replace theContainspattern with aRegexMatchthat makes the location suffix optional, so it matches both forms:r#"SQL error: ParserError\("Expected: end of statement, found: ON( at Line: \d+, Column: \d+)?"\)"#found: ONLY at ...are still not whitelistedTesting
cargo test: all tests pass, and the integration snapshots are unchangedseed = 7, 20 rounds × 50 queries (same config as feat: add NOT, IS NULL and IS NOT NULL expressions #14):mainfound: ON at Line ...errors