Skip to content

[native] Detect companion functions from velox function metadata#24482

Merged
aditi-pandit merged 1 commit intoprestodb:masterfrom
pramodsatya:companion_function_metadata
Feb 6, 2025
Merged

[native] Detect companion functions from velox function metadata#24482
aditi-pandit merged 1 commit intoprestodb:masterfrom
pramodsatya:companion_function_metadata

Conversation

@pramodsatya
Copy link
Contributor

@pramodsatya pramodsatya commented Feb 4, 2025

Description

Velox companion functions are excluded in the function signature map returned along the v1/functions endpoint by Presto native sidecar. Currently, these companion functions are detected by searching for specific suffixes in the registered velox function name. companionFunction metadata 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.

== NO RELEASE NOTE ==

@pramodsatya pramodsatya requested a review from a team as a code owner February 4, 2025 03:22
@prestodb-ci prestodb-ci added the from:IBM PR from IBM label Feb 4, 2025
@prestodb-ci prestodb-ci requested a review from a team February 4, 2025 03:22
if (kBlockList.count(name) != 0 ||
name.find("$internal$") != std::string::npos ||
isCompanionFunctionName(name, aggregateFunctions)) {
getScalarMetadata(name).companionFunction) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @czentgr, moved the submodule update to a separate PR.

@pramodsatya pramodsatya force-pushed the companion_function_metadata branch from d8f9db4 to 48132e8 Compare February 4, 2025 17:47
@pramodsatya pramodsatya changed the title [native] Advance velox and use velox companionFunction metadata in FunctionMetadata.cpp [native] Detect companion functions from velox function metadata Feb 4, 2025
@pramodsatya pramodsatya force-pushed the companion_function_metadata branch from 48132e8 to ab4eff3 Compare February 5, 2025 16:34
Copy link
Contributor

@aditi-pandit aditi-pandit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @pramodsatya

@aditi-pandit aditi-pandit merged commit 673c80f into prestodb:master Feb 6, 2025
61 checks passed
@pramodsatya pramodsatya deleted the companion_function_metadata branch February 6, 2025 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

from:IBM PR from IBM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants