Repository navigation
Parser: port upstream #2699 for (x) -> lambda chains - #20
Merged
moshap-firebolt merged 4 commits intoOct 22, 2026
Merged
Conversation
Upstream apache#2699 replaces it. The cherry-pick of upstream apache#2619 for nested POSITION calls, also in #18, stays.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The seed added with the apache#2699 port is the first file under fuzz/fuzz_seeds on this branch; upstream main already excludes the directory.
moshap-firebolt
force-pushed
the
moshap/port-upstream-lambda
branch
from
October 22, 2026 20:17
a305ce5 to
7ff4d82
Compare
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.
Replaces the fork's own fix for
(x) ->lambda chains from #18 with the upstream version, apache/datafusion-sqlparser-rs#2699. The cherry-pick of upstream apache#2619 (nestedPOSITIONcalls), also in #18, stays.Reverts the lambda half of #18, then cherry-picks apache#2699's two commits unchanged. The
src/, test and fuzz-seed changes are identical, line for line, to apache#2699; only conflict context (a neighbouring cache field, test-file tail) differs. The fork's full suite (--all-features), fmt and clippy are clean.🤖 Generated with Claude Code
Note
Medium Risk
Touches expression-prefix dispatch and failure memoization for lambda vs binary
->, which can change parse trees on edge-case SQL; risk is mitigated by targeted regression tests and upstream parity.Overview
Ports upstream apache#2699 for arrow lambda parsing and memoization, replacing the fork’s earlier lambda-chain fix while keeping the nested
POSITIONwork from the same effort.In
try_parse_lambda, comments and the failure-cache key are clarified (memo_key); behavior is still to memoize failed(<params>) -> <body>attempts so long(x) -> …chains cannot trigger exponential retries when the body does not parse.Tests are rewritten: the blowup guard uses a shorter chain and asserts every lambda-capable dialect rejects the bad SQL quickly; dispatch coverage now checks concrete AST shapes (nested lambdas,
->fallback when(1)is not a param list, cached vs uncached failure). A fuzz seed for Databricks-style lambda chains is added and excluded from RAT checks.Reviewed by Cursor Bugbot for commit 7ff4d82. Bugbot is set up for automated code reviews on this repo. Configure here.