alamb commented on code in PR #26351:
URL: https://github.com/apache/datafusion/pull/26351#discussion_r4307038756
##########
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
> feel free to directly push changes, or do a follow-up PR 🙏🏼
I pushed cc2ab97ff7 which is a fairly substantial rewording -- please feel
free to revert it if you don't agree
--
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]