2010YOUY01 commented on code in PR #26351: URL: https://github.com/apache/datafusion/pull/26351#discussion_r4300927248
########## datafusion/physical-optimizer/src/optimizer.rs: ########## @@ -16,6 +16,85 @@ // under the License. //! Physical optimizer traits +//! +//! # Physical Optimizer Contract +//! +//! This section explains the contract for extending or replacing the default +//! list of optimizer rules. +//! +//! [`PhysicalOptimizer::new`] defines the default rule sequence: +//! +//! ```text +//! // Default rules +//! let rules = vec![ +//! rule1, +//! rule2, +//! rule3, +//! rule4, +//! // ... +//! ]; +//! ``` +//! +//! It's recommended to keep the default rule order and using supported configuration +//! options to disable optimizations. These variations preserve correctness. For +//! example, `SET datafusion.optimizer.enable_distinct_aggregation_soft_limit = false` +//! disables the distinct aggregation soft-limit optimization. Custom pipelines +//! require more care, as described below. +//! +//! ## Custom Optimizer Pipelines Review Comment: Thank you for the review! I've addressed other feedbacks since they're smaller wording improvements, but not this one. I think i don't fully get how you want to express it better, feel free to directly push changes, or do a follow-up PR 🙏🏼 -- 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]
