feat(core): add LambdaBuilder for build-time lambda validation#753
Draft
benbellick wants to merge 22 commits intomainfrom
Draft
feat(core): add LambdaBuilder for build-time lambda validation#753benbellick wants to merge 22 commits intomainfrom
benbellick wants to merge 22 commits intomainfrom
Conversation
Note that these had to be tweaked slightly because they were not entirely valid. This will be fixed in substrait-go.
test: add lambda plan roundtrip tests
…ameter references Introduces LambdaBuilder, a context-aware builder that maintains a lambda parameter stack (lambdaContext) to validate parameter references at build time. Nested lambdas use the same builder, ensuring stepsOut is computed automatically. Mirrors the lambdaContext pattern from substrait-go.
Moves ProtoExpressionConverter to use LambdaBuilder for lambda parameter validation, removing the private LambdaParameterStack. Replaces builder-based roundtrip tests with parameterized JSON fixtures in expressions/lambda/. Adds arithmetic body test to isthmus LambdaExpressionTest.
…ment depth-capture mechanism
e8543d8 to
67c5a8a
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.
WIP: Adds LambdaBuilder, a context-aware builder that validates lambda parameter references at build time. Mirrors the lambdaContext stack pattern from substrait-go. The builder maintains a parameter stack, pushing/popping around body construction so that stepsOut is computed automatically. Nested lambdas use the same lb.lambda() call as root lambdas. Tests still need work.
Built on top of #710.
Ref #688