Repository navigation
Conversation
…ions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3094 +/- ##
==========================================
+ Coverage 83.71% 83.73% +0.02%
==========================================
Files 42 42
Lines 35908 35964 +56
Branches 35908 35964 +56
==========================================
+ Hits 30059 30116 +57
+ Misses 2412 2407 -5
- Partials 3437 3441 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
BenSatori
marked this pull request as ready for review
December 3, 2026 11:38
yoavcloud
self-requested a review
December 3, 2026 11:43
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, Generic
SELECT MAX(c.contact_name) KEEP (DENSE_RANK LAST ORDER BY c.id) AS metric FROM customers ccurrently fails with:Expected: end of statement, found: (Oracle's FIRST/LAST aggregates take a
KEEP (DENSE_RANK { FIRST | LAST } ORDER BY ...)clause after the function call, optionally followed byOVER (...). This PR addsFunction::keep: Option<Box<KeepClause>>(withKeepClauseandKeepRank), parsed whenDialect::supports_aggregate_keep_clause()is true (Oracle and Generic).KEEPis only treated as the clause when followed by(, sokeepstays usable as an identifier or alias.Syntax reference: https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/FIRST.html
API change:
Functiongains akeepfield, so code constructingFunctionliterals needskeep: None.Note on stack usage:
Functionis the largestExprvariant, so this growsExprfrom 328 to 336 bytes. On macOS arm64 debug builds that is enough to pushtest_parentheses_overflow(sqlparser_snowflake) andparse_table_factor_paren_chain_no_exponential_blowup(sqlparser_common) past the default 2 MiB test-thread stack; upstream main already passes them with only ~16-32 KiB to spare below therecursivecrate's 128 KiB red zone. Any new field onFunctionwould do the same. CI (Linux) passes both tests. Happy to send a separate PR to widen that margin (e.g. boxingFunction::over) if you'd prefer.Fuzzed with
fuzz_parse_sqlandfuzz_parse_roundtripfor 60 seconds each, no panics. Seed:fuzz/fuzz_seeds/oracle_aggregate_keep_clause.sql.This PR was written with AI assistance (Claude Code). I reviewed every line and can explain each change.
🤖 Generated with Claude Code