Repository navigation
refactor: move AdaptivePlanner's test-only methods into the AQE test module - #2666
Merged
andygrove merged 1 commit intoOct 26, 2026
Merged
Conversation
…module try_from_plan, runnable_stages, inspect_runnable_stages and current_plan were only used by tests but lived in planner.rs behind #[cfg(test)]. They now live in a test-only impl block in aqe/test/mod.rs, next to their callers. default_optimizers, find_runnable_exchanges and the RunnableStages alias become pub(super) so the test module can use them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
No issue; a cleanup noticed while reviewing #2664.
Rationale for this change
AdaptivePlannercarried four methods used only by tests (try_from_plan,runnable_stages,inspect_runnable_stages,current_plan), compiled in behind#[cfg(test)]inside the productionimplinplanner.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?
impl AdaptivePlannerblock inballista/scheduler/src/state/aqe/test/mod.rs, where all their callers are. They becomepub(super)(they werepub/pub(crate)but only compiled under test).default_optimizers,find_runnable_exchangesand theRunnableStagesalias becomepub(super)so the test module can use them. Theplanfield was alreadypub(crate).planner.rsno 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.