expr: extend #[sqlfunc] to variadic functions and convert all eager variadics#34985
Merged
antiguru merged 33 commits intoMaterializeInc:mainfrom Mar 5, 2026
Merged
expr: extend #[sqlfunc] to variadic functions and convert all eager variadics#34985antiguru merged 33 commits intoMaterializeInc:mainfrom
antiguru merged 33 commits intoMaterializeInc:mainfrom
Conversation
Pre-merge checklist
|
6c22a17 to
e9ed7e2
Compare
d59427b to
ac8fb59
Compare
antiguru
commented
Feb 26, 2026
ac8fb59 to
d59427b
Compare
078bc59 to
d695205
Compare
ggevay
reviewed
Mar 2, 2026
Contributor
ggevay
left a comment
There was a problem hiding this comment.
Looks good to me overall, wrote some comments.
494af7f to
c7f250e
Compare
9a3710d to
ebd0c52
Compare
ggevay
approved these changes
Mar 5, 2026
Contributor
ggevay
left a comment
There was a problem hiding this comment.
LGTM, I have just one minor comment left for list_slice_linear.
…functions Add the `EagerVariadicFunc` trait and a blanket `LazyVariadicFunc` implementation that bridges eager evaluation with the existing lazy dispatch. Extend the `#[sqlfunc]` proc macro to generate `EagerVariadicFunc` implementations for variadic functions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Moritz Hoffmann <mh@materialize.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Moritz Hoffmann <mh@materialize.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Moritz Hoffmann <mh@materialize.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Moritz Hoffmann <mh@materialize.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Moritz Hoffmann <mh@materialize.com>
…to #[sqlfunc] Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Moritz Hoffmann <mh@materialize.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Moritz Hoffmann <mh@materialize.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Moritz Hoffmann <mh@materialize.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Moritz Hoffmann <mh@materialize.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Moritz Hoffmann <mh@materialize.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Moritz Hoffmann <mh@materialize.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Moritz Hoffmann <mh@materialize.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Moritz Hoffmann <mh@materialize.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Moritz Hoffmann <mh@materialize.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Moritz Hoffmann <mh@materialize.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Moritz Hoffmann <mh@materialize.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Moritz Hoffmann <mh@materialize.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Moritz Hoffmann <mh@materialize.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Moritz Hoffmann <mh@materialize.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Moritz Hoffmann <mh@materialize.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Moritz Hoffmann <mh@materialize.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Moritz Hoffmann <mh@materialize.com>
Extend `derive_variadic!` to generate the full `impl VariadicFunc` block (eval, output_type, propagates_nulls, introduces_nulls, could_error, is_monotone, is_associative, is_infix_op) by delegating to `LazyVariadicFunc` trait methods. Remove the hand-written dispatch that duplicated per-variant logic. Convert `RangeCreate` to `EagerVariadicFunc`. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
Author
|
Thanks! I must have attributed your comment to the wrong source location, you're correct! I updated the |
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.
Add the
EagerVariadicFunctrait with a blanketLazyVariadicFuncimplementation, and extend the#[sqlfunc]proc macro to generateEagerVariadicFuncimplementations for variadic functions.Convert all 30 eager variadic functions from hand-written dispatch to
#[sqlfunc]-derived implementations, then extendderive_variadic!to generate the fullVariadicFuncdispatch.Best viewed commit-by-commit.
🤖 Generated with Claude Code