alamb opened a new pull request, #27833: URL: https://github.com/apache/datafusion/pull/27833
## Which issue does this PR close? Related to the [review discussion on #27772](https://github.com/apache/datafusion/pull/27772#issuecomment-7255021653). ## Rationale for this change While reviewing #27772, I wanted to understand how a physical optimizer rule knows that the query requires a particular output order. Once a redundant sort is removed, a later rule still needs to know that the caller expects sorted results. ## What changes are included in this PR? Expand the rustdoc for `OutputRequirements` with a `SELECT a FROM t ORDER BY a` example. The physical plans show how `OutputRequirementExec` records the required ordering and distribution when a scan already supplies sorted rows. The docs also describe when the optimizer adds and removes the temporary operator. ## What is the testing strategy for this PR? Built the crate docs with `cargo doc -p datafusion-physical-optimizer --no-deps --locked`. The crate formatting check and `git diff --check` also passed. ## Are there any user-facing changes? Documentation only. -- 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]
