2010YOUY01 commented on code in PR #19030: URL: https://github.com/apache/datafusion/pull/19030#discussion_r2579437145
########## docs/source/library-user-guide/upgrading.md: ########## @@ -332,6 +332,102 @@ let config = FileScanConfigBuilder::new(url, source) **Handling projections in `FileSource`:** +### `PhysicalOptimizerRule::optimize` deprecated in favor of `optimize_plan` + +The `PhysicalOptimizerRule` trait has been updated to provide optimizer rules with access to broader session context. A new method `optimize_plan` has been added that accepts an `OptimizerContext` parameter, and the existing `optimize` method has been deprecated. + +**Who is affected:** + +- Users who have implemented custom `PhysicalOptimizerRule` implementations + +**Breaking changes:** + +1. **New `optimize_plan` method**: This is the preferred method for implementing optimization rules. It provides access to the full `SessionConfig` through `OptimizerContext`, rather than just `ConfigOptions`. + +2. **`optimize` method deprecated**: The old `optimize` method that takes `&ConfigOptions` is now deprecated and will be removed in DataFusion 54.0.0. Review Comment: ```suggestion 2. **`optimize` method deprecated**: The old `optimize` method that takes `&ConfigOptions` is now deprecated and will be removed in DataFusion 58.0.0. ``` I think this will be released in `52.0.0`, and we have the policy to remove it after 6 major releases: https://datafusion.apache.org/contributor-guide/api-health.html#deprecation-guidelines -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
