-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Deprecate OptimizerRule::try_optimize
#11022
Conversation
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.
THank you @lewiszlw ! I think we should consider deprecating optimize_children
instead of modifying its signature.
@@ -77,6 +77,10 @@ pub trait OptimizerRule { | |||
/// Note this API will be deprecated in the future as it requires `clone`ing | |||
/// the input plan, which can be expensive. OptimizerRules should implement | |||
/// [`Self::rewrite`] instead. | |||
#[deprecated( | |||
since = "40.0.0", | |||
note = "please implement supports_rewrite and rewrite instead" |
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.
👍
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.
Awesome!
I am also pretty happy with how the TreeNode API is to work with now so this hopefully won't be too large a migration for anyone
* Deprecate OptimizerRule::try_optimize * optimize_children * Apply review suggestions * Fix clippy lint
* Deprecate OptimizerRule::try_optimize * optimize_children * Apply review suggestions * Fix clippy lint
* Deprecate OptimizerRule::try_optimize * optimize_children * Apply review suggestions * Fix clippy lint
Which issue does this PR close?
Closes #.
Rationale for this change
As we have already migrated built-in optimizer rules to use
rewrite
api, I think it's time to deprecatetry_optimize
api.What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?