alamb opened a new pull request, #26899:
URL: https://github.com/apache/datafusion/pull/26899

   ## Which issue does this PR close?
   
   - Follow on to #21824
   
   ## Rationale for this change
   
   `datafusion/core/src/optimizer_rule_reference.md` held tables of the 
built-in analyzer, logical optimizer, and physical optimizer rules and was 
spliced into the `datafusion` crate docs via `include_str!`. Keeping that 
reference in a separate markdown file means it lives far from the rule lists it 
describes, so it drifts (for example, the `eliminate_join` summary no longer 
matched the rule's behavior) and needed a dedicated test to keep the order in 
sync.
   
   This PR moves the content next to the code so the rule list and its 
documentation are in the same `new()` function and can be reviewed together.
   
   ## What changes are included in this PR?
   
   - Move the three rule tables into the doc comments on `Analyzer::new`, 
`Optimizer::new`, and `PhysicalOptimizer::new`. Each row links to the rule 
struct, so rustdoc verifies the rule still exists.
   - Keep the surrounding notes: rule names match `EXPLAIN VERBOSE`, order 
matters, the default list may change between releases, and the same physical 
rule may run in multiple phases.
   - Update the `eliminate_join` summary to match what the rule does today.
   - Add struct docs to `UnionsToFilter` and `EliminateCrossJoin`, the only 
built-in rules whose structs had none.
   - Link to the three constructors from the "Planning" section of the 
`datafusion` crate docs.
   - Remove `optimizer_rule_reference.md` and the `optimizer_rule_reference.rs` 
test module that parsed it.
   
   ## What is the testing strategy for this PR?
   
   Documentation only. `cargo doc` with `RUSTDOCFLAGS="-D warnings"` passes for 
`datafusion-optimizer`, `datafusion-physical-optimizer`, and `datafusion`, 
which checks the intra-doc links to every rule struct. The removed tests only 
compared the markdown tables against the default rule lists; the tables now sit 
directly above those lists.
   
   ## Are there any user-facing changes?
   
   No API changes. The rule reference moves from the `datafusion` crate root 
docs to the three constructor docs.
   


-- 
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]

Reply via email to