[refine](function) unify use_default_implementation_for_constants interface#62711
Open
Mryange wants to merge 1 commit intoapache:masterfrom
Open
[refine](function) unify use_default_implementation_for_constants interface#62711Mryange wants to merge 1 commit intoapache:masterfrom
Mryange wants to merge 1 commit intoapache:masterfrom
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
/review |
Contributor
There was a problem hiding this comment.
No blocking findings.
Critical Checkpoints
- Goal and correctness: The PR goal is to unify the constant-handling interface so the function property checked by
VectorizedFnCalland the property used by execution share the same override path. The rename and the explicitIFunctionoverride accomplish that, and thearray_match_*cleanup is consistent with the framework constant path. - Scope: The change is small and focused to the constant-handling interface, its call sites, and the two affected functions.
- Concurrency: No new concurrency, lock, or thread-safety behavior is introduced in the reviewed paths.
- Lifecycle and static initialization: No special lifecycle or static initialization changes are involved.
- Configuration: No config changes.
- Compatibility: This is an internal BE interface rename only. I did not find FE/BE protocol, storage format, or rolling-upgrade compatibility impact.
- Parallel code paths: I checked both
IFunctionand directIFunctionBaseimplementations touched here (cast, Java UDF, Python UDF, RPC,search). The rename is applied consistently across the relevant dispatch paths. - Special conditions:
ArrayMatchFunctionno longer manually unpacks const columns and now relies on the default constant implementation, which matchesPreparedFunctionImplbehavior. - Tests: Existing regression coverage exercises
array_match_all/any, and the obsoleteFunctionSearchproperty assertion was updated. There is still no new targeted test for the unified constant-dispatch path itself, so that remains a small residual gap but not a blocker from my review. - Test result files: None changed.
- Observability: No new observability requirement for this refactor.
- Transaction, persistence, and data-write safety: Not applicable.
- Performance: The change slightly simplifies the
array_match_*path by removing redundant const unpacking. - Other issues: None found in the reviewed diff.
Overall, this PR looks good to merge from the reviewed code paths.
Contributor
Author
|
run buildall |
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
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.
Problem
IFunctionBasedeclared a pure virtual methodis_use_default_implementation_for_constants(),while
PreparedFunctionImpldeclared a separate methoduse_default_implementation_for_constants()with the same semantics but different name.
IFunctionbridged them with a forwarding override, but this caused confusion:is_use_default_implementation_for_constants()onIFunctionbypassed the
PreparedFunctionImplmethod, causing the two to return inconsistent values.ArrayMatchFunctionoverrodeis_use_default_implementation_for_constants()toreturn
false, butuse_default_implementation_for_constants()still returnedtrue(default),so the execution framework still unpacked const columns, while
execute_implalso calledunpack_if_constredundantly.Solution
IFunctionBase::is_use_default_implementation_for_constants()touse_default_implementation_for_constants()to unify the two interfaces into one name.IFunctionto resolve the multiple-inheritance ambiguity betweenIFunctionBaseandPreparedFunctionImpl.is_use_default_implementation_for_constants()bridge inIFunction.ArrayMatchFunction: remove the incorrectis_use_default_implementation_for_constants()override and the unused
unpack_if_constcall, letting the framework handle const columns viathe default
use_default_implementation_for_constants() = truepath.FunctionSearch.Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)