chore: remove ScalarUDFImpl::return_type_from_exprs #15130
Merged
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.
use
return_type_from_args
insteadWhich issue does this PR close?
Rationale for this change
Implementing
return_type_from_exprs
is almost harmful, since it's not used by DataFusion for anything. Implementing it instead ofreturn_type
orreturn_type_from_args
leads to code that compiles but fails at runtime.Filing this to start the discussion of if we want to take it in.
Somewhat related to #15123
What changes are included in this PR?
Removes
return_type_from_exprs
completely. This leads to compile failures for anyone who's mistakenly still using it.Also removes
create_physical_expr
function which was using thisreturn_type_from_exprs
. Given it's also marked as deprecated I didn't check if it could be rewritten to usereturn_type_from_args
instead, but if that's possible, we can do it as well to reduce the impact.Are these changes tested?
Existing tests
Are there any user-facing changes?
Yes, BREAKING CHANGE: ScalarUDFImpl::return_type_from_exprs is removed, also
create_physical_expr
is removed.