Conversation
Replace the pre_asap/post_asap split with modules named for what they hold: - ir::operator: node, non_asap, asap, operator_properties, agg_intent, maintained_population - ir::scalar: scalar expressions, expr_ir items, scalar_type_rules, column_resolution - ir::schema: Schema/Field/DataType, aggregate_schema, error, and the summary state types (state_type, formerly post_asap::sketch) - ir::properties: guarantee, timing, summary_coverage, and the execution timing/data-state types split out of execution_data_state - workload: workload, parsed_workload, resources - physical: the rest of execution_data_state, and summary_window post_asap::query_time had no callers and is deleted. Public type names are unchanged; every import across the workspace is rewritten, with no compatibility re-exports from the old paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Step B1 of Phase B of #572 (tracker #528): arrange
asap-typesby #511 section instead of the pre-ASAP / post-ASAP split.Why
pre_asapandpost_asapno longer describe their contents. There is one operator DAG (#511),pre_asap::schemais the schema of every DAG, andpost_asap::sketchis shared vocabulary that the logical stage uses. The later Phase B crates (logical-optimizer, physical-optimizer, plan-selection, executor) should import types by what they are, not by a stage name that no longer exists.What
Before this PR
After this PR
post_asap::query_timehad no callers and is deleted, along with its 20 unit tests.mod.rsre-exports the vocabulary thatpre_asap/post_asapused to re-export, sopre_asap::AggIntentbecomesir::operator::AggIntent,post_asap::SketchAlgorithmbecomesir::schema::SketchAlgorithm, and so on. Theirroot keeps its existing re-exports (OperatorNode,ASAPOp, the timing functions, …).lib.rscrate docs and the docs that cite module or file paths are updated.How
git mvfor every file, so history follows the moves. Similarity is 88–100 %.usetree rooted atasap_types,planner_types/planner(the alias inasap-physical-operators) orcrate(insideasap-types), maps each leaf path to its new module, and regroups the result. It does the same for inline qualified paths. Thencargo checkiteration andcargo fmt..rs). About 580usestatements rewritten, plus about 345 inline qualified paths.#[test]count goes from 1793 to 1773, and the 20 removed are exactly the deletedquery_timetests. No other test is changed beyond its import paths.Gate at this tip:
cargo fmt --all --check,cargo clippy --workspace --all-targets --all-features -- -D warnings,cargo test --workspace(1518 passed, 0 failed, 12 ignored) andpython3 -m unittest discover -s tools/dag-viewer -p test_render.py(29 run, OK, 6 skipped) all pass.Deviations from #572, for review
ExecutionDataStateErrorandDataPrimitivego toir::propertiestogether withExecutionTiming/ExecutionDataState, not tophysical. The reason is the one Reorganize crates and modules by #509 stages and the #511 unified IR #572's update gives for the split:ir/timingandir/physical_exportuse them. What stays inphysical::execution_data_stateislift_plainandExactOperationSchemaError. Their only callers today are Stage 1 (exact_composition), sophysicalmay not be their final home.expr_ir.rsis now a private file ofir::scalar, and its four items are re-exported there. This avoids anir::scalar::expr_irpath that keeps the legacy name.ir::schema_support(PromQL series-identity realization) stays at theirroot, andcost,dag_export,serde_f64,typesstay at the crate root.tools/dag-viewer/post_asap_fixture.jsonstill exists but nothing references it, so it is not renamed.PostAsapDAG/pre_asap_sub_dagare gone from code.PostAsapDAGis still mentioned in prose indocs/design_docs/concepts/post-asap-ir.md,docs/design_docs/physical-planning-and-deployment.mdanddocs/develop_docs/library-api.md, which this PR leaves alone.docs/develop_docs/*-migration.mdkeep their historicalpre_asap::paths.CostModeltrait and recurrence types intoasap-types) is not in this stack, and this PR is based directly on test: #509 Example 1 acceptance spec and end-to-end tests #577. B0 cannot be done as a types-only move:ReplacementSubDAG,TargetSubDAG,Replacement,Realization,ExactComposition,ExactOperationandOperationPlacement. For example,ExactComposition::compose_with_accuracyusesAccuracyModel, andOperationPlacement::provenancereturnsReplacementProvenance.size_paramscallsaccuracy::estimators::size_params, andcse_share_decision_with_recurrencecallsrecurrence::decide.Refs #572 · #528
🤖 Generated with Claude Code