andygrove opened a new pull request, #2666:
URL: https://github.com/apache/datafusion-ballista/pull/2666

   # Which issue does this PR close?
   
   No issue; a cleanup noticed while reviewing #2664.
   
   # Rationale for this change
   
   `AdaptivePlanner` carried four methods used only by tests (`try_from_plan`, 
`runnable_stages`, `inspect_runnable_stages`, `current_plan`), compiled in 
behind `#[cfg(test)]` inside the production `impl` in `planner.rs`, along with 
a `#[cfg(test)]` import. Test-only code is easier to find and keeps the 
production file smaller when it lives with the tests that use it.
   
   # What changes are included in this PR?
   
   - The four methods move, unchanged in behaviour, into a test-only `impl 
AdaptivePlanner` block in `ballista/scheduler/src/state/aqe/test/mod.rs`, where 
all their callers are. They become `pub(super)` (they were `pub`/`pub(crate)` 
but only compiled under test).
   - `default_optimizers`, `find_runnable_exchanges` and the `RunnableStages` 
alias become `pub(super)` so the test module can use them. The `plan` field was 
already `pub(crate)`.
   - `planner.rs` no longer has any `#[cfg(test)]` items.
   
   Covered by the existing AQE tests, which call these methods throughout; no 
test changes were needed beyond the move.
   
   # Are there any user-facing changes?
   
   No. The moved methods were only compiled under `#[cfg(test)]`, so no public 
API changes.
   


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