-
Notifications
You must be signed in to change notification settings - Fork 1.9k
let PhysicalOptimizerRule accept SessionConfig instead of ConfigOptions #18168
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
let PhysicalOptimizerRule accept SessionConfig instead of ConfigOptions #18168
Conversation
75e9a56 to
3a445e3
Compare
…s as the second argument to "optimizer()"
3a445e3 to
f722d32
Compare
adriangb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a reasonable change to me, but I think we should wait until we are certain we are going to need it for #18172 before we merge it to avoid breaking the API without good justification
|
@gabotechs sorry for not coming back to this. I’d like to help get it across the line. Are you okay if I resolve conflicts and push? |
|
My only feedback for review is if we should add a new argument with Extensions or make the argument OptimizerContext so that we can make future changes without it being breaking |
Sure! |
I'm trying to look for inspiration in the docs for this, and I found:
Following that same pattern, for the same reason that a WDYT? |
|
Also, found another different reason for wanting this: |
Yep agreed! And we can even add a new method to the trait |
|
Something like #18739 |
|
Closing in favor of #18739 |
Which issue does this PR close?
Rationale for this change
Users might want to create their own
PhysicalOptimizerRuleimplementations. Users might have their ownSessionConfig.extensions. Users might want to use their ownSessionConfig.extensionsin their customPhysicalOptimizerRuleimplementations.This PR is needed for gabotechs#7, but it was factored out as it's an isolated change that could have value on its own.
What changes are included in this PR?
Changes signature of
PhysicalOptimizerRule.optimzeto take aSessionConfigrather than aConfigOptions.Are these changes tested?
yes, by current tests.
Are there any user-facing changes?
yes,
PhysicalOptimizerRule.optimzenow takes aSessionConfigrather than aConfigOptions, which is a breaking non backwards compatible change.