expr: extend #[sqlfunc] to variadic functions and convert all eager variadics#34985
Open
antiguru wants to merge 33 commits intoMaterializeInc:mainfrom
Open
expr: extend #[sqlfunc] to variadic functions and convert all eager variadics#34985antiguru wants to merge 33 commits intoMaterializeInc:mainfrom
antiguru wants to merge 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
5013ece to
7553d9a
Compare
…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>
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>
7553d9a to
078bc59
Compare
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>
078bc59 to
d695205
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.
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