Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[native] Add static mapping of native query configs #21266

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

bikramSingh91
Copy link
Contributor

@bikramSingh91 bikramSingh91 commented Oct 28, 2023

This change updates the mapping of native only query configs from a
prefix-based system to a hardcoded, static mapping. This is to
decouple naming conventions that can be different between presto
and velox. For instance, Velox permits the use of dots, whereas Presto
employs dots to indicate the catalog to which a property should
be linked.

@bikramSingh91 bikramSingh91 requested review from a team as code owners October 28, 2023 03:15
@mbasmanova mbasmanova requested a review from kewang1024 October 28, 2023 10:55
Copy link
Contributor

@mbasmanova mbasmanova left a comment

Choose a reason for hiding this comment

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

Thanks. Looks good % a few minor comments.

@lingbin
Copy link
Contributor

lingbin commented Oct 28, 2023

nit but as a reminder: In my observation, in the title of the commit message, it is more likely to use "[native]"(lowercase) as a tag instead of "[Native]".

@amitkdutta amitkdutta changed the title [Native] Add static mapping of native query configs [native] Add static mapping of native query configs Oct 28, 2023
Copy link
Collaborator

@kewang1024 kewang1024 left a comment

Choose a reason for hiding this comment

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

RE "For example velox allows dots whereas presto does not."

Can you give an example of such config/session property?

@bikramSingh91
Copy link
Contributor Author

RE "For example velox allows dots whereas presto does not."

Can you give an example of such config/session property?

@kewang1024 debug.validate_output_from_operators is one such config that uses dots whereas in Presto, it employs dots to indicate the catalog to which a property should be linked. https://prestodb.io/docs/current/sql/set-session.html

Comment on lines 75 to 85
{"native_execution_process_reuse_enabled",
QueryConfig::kAggregationSpillMemoryThreshold},
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like this pair doesn't match?

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 for catching this, forgot to remove it since it doesnt map to anything in velox. Will remove it in the next iteration of this PR

Copy link
Collaborator

@kewang1024 kewang1024 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Copy link
Contributor

@mbasmanova mbasmanova left a comment

Choose a reason for hiding this comment

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

Thanks.

return name.substr(kNativePrefix.length());
}
return name;
// Utility function to translate a config name in presto to its equivalent in
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: presto -> Presto

@bikramSingh91 bikramSingh91 force-pushed the query_configs branch 3 times, most recently from a5bcc5e to 6df067b Compare November 4, 2023 00:24
This change updates the mapping of native only query configs from a
prefix-based system to a hardcoded, static mapping. This is to
decouple naming conventions that can be different between presto
and velox. For instance, Velox permits the use of dots, whereas Presto
employs dots to indicate the catalog to which a property should
be linked.
@bikramSingh91
Copy link
Contributor Author

A failure in testQueryScanExceeded in pre-commits which looks unrelated

Copy link
Contributor

@xiaoxmeng xiaoxmeng left a comment

Choose a reason for hiding this comment

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

@bikramSingh91 LGTM. Thanks!

@xiaoxmeng xiaoxmeng merged commit 7eb6188 into prestodb:master Nov 9, 2023
@bikramSingh91 bikramSingh91 deleted the query_configs branch November 9, 2023 19:50
@wanglinsong wanglinsong mentioned this pull request Dec 8, 2023
26 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants