Repository navigation
feat: deprecate AggregateUDFImpl::is_nullable in favour of return_field - #26746
Open
CuteChuanChuan wants to merge 1 commit into
Open
CuteChuanChuan wants to merge 1 commit into
CuteChuanChuan wants to merge 1 commit into
Conversation
|
Thank you for opening this pull request! Reviewer note: cargo-semver-checks reported the current version number is not SemVer-compatible with the changes in this pull request (compared against the base branch). Details |
Contributor
Author
|
Hi @Jefffrey, could you PTAL when you have a chance? Thanks 🙏! |
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.
Which issue does this PR close?
AggregateUDFImpl::is_nullablein favour ofreturn_field#18882.Rationale for this change
An aggregate's nullability is described twice: by
AggregateUDFImpl::is_nullableand by the field returned fromAggregateUDFImpl::return_field.AggregateFunctionExprstored both, sois_nullable()andfield().is_nullable()could disagree. This makesreturn_fieldthe single source of truth, following #17074 for scalar UDFs.What changes are included in this PR?
AggregateUDFImpl::is_nullableandAggregateUDF::is_nullable(since 56.0.0).AggregateExprBuilder::buildnow derivesis_nullablefrom the return field.count,approx_distinct,regr_*) and theCounttest stub toreturn_field.FFI_AggregateUDF::is_nullablefield for ABI stability and silence the deprecation warning; it can be removed together with the method.This addresses the review feedback on #18934.
What is the testing strategy for this PR?
Covered by existing tests.
Are there any user-facing changes?
Yes. Implementations overriding
is_nullableshould set nullability inreturn_fieldinstead.