[native] Detect companion functions from velox function metadata#24482
Merged
aditi-pandit merged 1 commit intoprestodb:masterfrom Feb 6, 2025
Merged
Conversation
czentgr
reviewed
Feb 4, 2025
| if (kBlockList.count(name) != 0 || | ||
| name.find("$internal$") != std::string::npos || | ||
| isCompanionFunctionName(name, aggregateFunctions)) { | ||
| getScalarMetadata(name).companionFunction) { |
Contributor
There was a problem hiding this comment.
Do we need this change in the same PR as the velox update?
It is ok if we update velox and then make the change as a follow up.
Contributor
Author
There was a problem hiding this comment.
Thanks @czentgr, moved the submodule update to a separate PR.
d8f9db4 to
48132e8
Compare
companionFunction metadata in FunctionMetadata.cpp48132e8 to
ab4eff3
Compare
czentgr
approved these changes
Feb 5, 2025
aditi-pandit
approved these changes
Feb 6, 2025
Contributor
aditi-pandit
left a comment
There was a problem hiding this comment.
Thanks @pramodsatya
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.
Description
Velox companion functions are excluded in the function signature map returned along the
v1/functionsendpoint by Presto native sidecar. Currently, these companion functions are detected by searching for specific suffixes in the registered velox function name.companionFunctionmetadata was added to velox scalar, aggregate, and window function metadata recently as per this discussion. This PR detects companion functions using velox function metadata instead. Depends on #24490.Motivation and Context
Follows from this discussion and from this PR.