Skip to content

Commit 999fd95

Browse files
zzylolclaude
andcommitted
refactor(planner): move the pass facade into asap-planner and delete asap-aware-mapping
Move asap-aware-mapping's pass/ (OptimizationPass, StagePipeline, PassRegistry, optimize) into crates/planner, the facade per #572, and remove the now-empty asap-aware-mapping crate from the workspace. PlanningModels is re-exported by the planner from asap-plan-selection. The stage manifest guards now name asap-planner instead of the deleted crate. Docs and comments that cited asap-aware-mapping as a crate now name the stage crate that owns the code (#572, B4b). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 452ed7d commit 999fd95

30 files changed

Lines changed: 54 additions & 115 deletions

File tree

‎Cargo.lock‎

Lines changed: 0 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ members = [
44
"crates/types",
55
"crates/frontend-common",
66
"crates/sql-function-catalog",
7-
"crates/asap-aware-mapping",
87
"crates/logical-optimizer",
98
"crates/physical-optimizer",
109
"crates/plan-selection",

‎crates/asap-aware-mapping/Cargo.toml‎

Lines changed: 0 additions & 14 deletions
This file was deleted.

‎crates/asap-aware-mapping/src/lib.rs‎

Lines changed: 0 additions & 30 deletions
This file was deleted.

‎crates/devtools/src/bin/show_post_asap_ir.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// (or pipe via stdin: cargo run -p asap-devtools --bin show_post_asap_ir < queries.txt)
33
//
44
// Lowers a batch of ad-hoc SQL/PromQL queries to pre-ASAP IR, then runs the
5-
// `asap-aware-mapping` pre-ASAP → post-ASAP binding pass and prints the
5+
// `asap-logical-optimizer` pre-ASAP → post-ASAP binding pass and prints the
66
// resulting **post-ASAP IR** (the sketch-bound IR: an `OperatorNode` DAG in
77
// which `ASAPOp` operators — the concrete summary family/params committed per
88
// aggregate — replace the bound aggregates, while whatever the pass left

‎crates/frontend-promql/tests/observability/promql_corpus.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ fn tally(corpus: &str) -> Tally {
8888
}
8989

9090
/// Every query that lowers, additionally run through the pre-ASAP →
91-
/// post-ASAP `asap-aware-mapping` binding pass (issue #98), at an
91+
/// post-ASAP `asap-logical-optimizer` binding pass (issue #98), at an
9292
/// approximate accuracy target so the sketch-selection boundary actually
9393
/// fires (an `Exact` target would only ever exercise the exact-accumulator
9494
/// arm).

‎crates/integration-tests/tests/cse.rs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//! Drives the full staged pipeline this issue lands: two independently
55
//! lowered `OperatorNode` DAGs → `share_common_sub_dags` (stage 1,
66
//! `asap-types::ir::cse`, run internally by `search_workload`) →
7-
//! `search_workload` (stage 2, `asap-aware-mapping`) — and asserts the
7+
//! `search_workload` (stage 2, `asap-logical-optimizer`) — and asserts the
88
//! sharing that stage 1 decides survives into stage 2's discovered
99
//! `CandidateLogicalASAPDAGs` as one genuinely shared `TargetSubDAGCandidates`, not just one shared
1010
//! `Rc<OperatorNode>`. This is the "real caller" the issue's landing plan
@@ -15,9 +15,9 @@
1515
//! Committing to one final, physically-materialized answer for a whole
1616
//! workload (the former `implement_workload`/`implement_workload_with`,
1717
//! which this test file used to drive instead of `search_workload`) is out
18-
//! of `asap-aware-mapping`'s scope — see that crate's `lib.rs` `## Status`
18+
//! of `asap-logical-optimizer`'s scope — see that crate's `lib.rs` `## Status`
1919
//! section — so these tests assert on the discovered `CandidateLogicalASAPDAGs` shape
20-
//! directly, the same way `asap-aware-mapping::replacement`'s own
20+
//! directly, the same way `asap-logical-optimizer::pass1::replacement`'s own
2121
//! `shared_aggregate_across_two_roots_gets_both_strategies_candidates` test
2222
//! does, just exercised through the crate's public API from this external
2323
//! integration-test crate.
@@ -70,7 +70,7 @@ fn duplicate_workload_queries_collapse_onto_one_memo_group() {
7070
// TargetSubDAGCandidates with consumer_count 2 — ASAPStrategies's one
7171
// ExactAggregate candidate *and* SharedSubDAGStrategy's share-vs-
7272
// recompute pair, exactly as `shared_aggregate_across_two_roots_gets_both_strategies_candidates`
73-
// (asap-aware-mapping::replacement's own equivalent, internal test)
73+
// (asap-logical-optimizer::pass1::replacement's own equivalent, internal test)
7474
// pins for the same fixture shape.
7575
let group = space
7676
.candidates_for_target(&space.roots[0].1)

‎crates/logical-optimizer/src/accuracy/mod.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use asap_types::types::AccuracyTarget;
2929

3030
use crate::pass1::exact_composition::ExactOperation;
3131

32-
/// The deployment-extensible accuracy algebra. `asap-aware-mapping` ships
32+
/// The deployment-extensible accuracy algebra. `asap-logical-optimizer` ships
3333
/// [`DefaultAccuracyModel`]; a deployment with a proof for a composition the
3434
/// default rejects (a registered cross-metric conversion, say) implements
3535
/// this trait and passes it to

‎crates/logical-optimizer/src/pass1/rollup.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
//! own set through [`RollupStrategy::new`].
8888
//! - **No materialized roll-up operator.** Actually building a pre-aggregated
8989
//! summary/scan leaf at execution time is separate, larger work outside
90-
//! `asap-aware-mapping`'s scope (see issue #254's own "Non-goal" section)
90+
//! `asap-logical-optimizer`'s scope (see issue #254's own "Non-goal" section)
9191
//! — this module only constructs the pre-ASAP `NonASAPOp::Aggregate`
9292
//! rewrite; a `CostModel`/search engine decides whether to prefer it.
9393
//! - **No cross-schema reconciliation** (see "`ColumnId` comparability"

‎crates/logical-optimizer/tests/stage1_cost_independence.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const FORBIDDEN_MODULES: &[&str] = &["cost_model", "recurrence"];
1010
const FORBIDDEN_CRATES: &[&str] = &[
1111
"asap-physical-optimizer",
1212
"asap-plan-selection",
13-
"asap-aware-mapping",
13+
"asap-planner",
1414
"asap-physical-operators",
1515
];
1616

0 commit comments

Comments
 (0)