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

Add session property to have connector optimizer apply on Values node #24227

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

feilong-liu
Copy link
Contributor

@feilong-liu feilong-liu commented Dec 10, 2024

Description

Currently, input node which is not a table scan, i.e. values node are considered as empty_connector_id, hence sub plans which have values node cannot be optimized by connector optimizer.
For example:

Join
    - table scan
    - values

this sub plan is not eligible for connector optimization

This PR adds a new session property, when enabled, sub plans which have values node will also be optimized by connector optimizer.

Motivation and Context

We have an internal connector optimizer which needs to work on the plans with both values node and table scan node.

Impact

Enable more flexible usage of connector optimizer. The default value of the new property is true

Test Plan

Existing tests

Contributor checklist

  • Please make sure your submission complies with our contributing guide, in particular code style and commit standards.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== RELEASE NOTES ==

General Changes
* Add a session property `include_values_node_in_connector_optimizer` to enable connector optimizer optimize plans with values node  :pr:`12345`

@prestodb-ci prestodb-ci added the from:Meta PR from Meta label Dec 10, 2024
@feilong-liu feilong-liu marked this pull request as draft December 10, 2024 00:55
@feilong-liu feilong-liu force-pushed the apply_connector_values branch from 35aaed1 to 4e536ab Compare December 10, 2024 00:56
@feilong-liu feilong-liu marked this pull request as ready for review December 10, 2024 00:56
rschlussel
rschlussel previously approved these changes Dec 10, 2024
Copy link
Contributor

@rschlussel rschlussel left a comment

Choose a reason for hiding this comment

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

I think this makes sense. IMO we could even set this to true by default. I can't think of a good reason to exclude the values nodes from connector optimizers.

What do you think @jaystarshot @hantangwangd @aaneja?

@jaystarshot
Copy link
Member

+1 the default should be true

@hantangwangd
Copy link
Member

It's a great feature, and agree that the default should be true. I can't think out any disadvantage result by doing this.

hantangwangd
hantangwangd previously approved these changes Dec 10, 2024
@feilong-liu feilong-liu dismissed stale reviews from hantangwangd and rschlussel via 398f59d December 10, 2024 18:00
@feilong-liu feilong-liu force-pushed the apply_connector_values branch from 4e536ab to 398f59d Compare December 10, 2024 18:00
@feilong-liu
Copy link
Contributor Author

Changed the default value to true based on comments

@feilong-liu feilong-liu merged commit 2edc8bc into prestodb:master Dec 10, 2024
57 checks passed
@feilong-liu feilong-liu deleted the apply_connector_values branch December 10, 2024 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from:Meta PR from Meta
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants