Repository navigation
Conversation
This was referenced Oct 12, 2026
zzylol
force-pushed
the
stack/528-07-planner
branch
from
October 12, 2026 20:30
19e77b0 to
f0afd89
Compare
zzylol
force-pushed
the
stack/528-07b-promote-roots
branch
from
October 12, 2026 20:30
7dc95a1 to
26b7ab0
Compare
…ones Since the previous commit nothing calls the legacy SQL, PromQL and MetricsQL lowerings or their tests; the unified modules take their paths in the next commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW
…e roots
Moves plus import updates: `asap_frontend_{sql,promql,metricsql}::unified`
become the crate roots, `unified_physical_planner` / `unified_sources` /
`expressions::unified_planner` become `physical_planner` / `sources` /
`expressions::planner`, and the `unified_*` tests take the names of the
tests they replace. The moved files also take the DAG wording ("tree" ->
"DAG", "readout" -> "evaluation") the rest of the stack uses, and the
MetricsQL frontend's legacy lowering test is ported to the unified API
with the ingestion-interval parameter.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW
…iew cleanups The external-consumer script calls lower_metricsql with the ingestion interval it now takes, and removes its temp crate on exit. Also: the physical-operators README names the input a Planner PhysicalASAPDAG, expressions/mod.rs names CompiledExpression directly, lowering test locals and prose say dag/DAG, and the default_rollup-without-range test is dropped since rollups_without_an_explicit_range_are_rejected covers it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW
zzylol
force-pushed
the
stack/528-07b-promote-roots
branch
from
October 12, 2026 22:55
26b7ab0 to
8aba6bc
Compare
This was referenced Oct 12, 2026
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.
Why
After #542 the planner calls the unified modules through their temporary
unifiedpaths, and the replaced legacy frontend modules are dead. This PR gives the unified code its final paths, so the crates read as they will stay.What
Moves, import updates and the documentation/tooling that names the moved APIs. No planner or execution behavior change.
asap_frontend_{sql,promql,metricsql}::unifiedbecome the crate roots; the replaced legacy frontend modules and their tests are deleted.unified_physical_planner/unified_sourcesbecomephysical_planner/sources;expressions/unified_planner.rsbecomes the privateexpressions/planner.rs(re-exported asexpressions::CompiledExpression), andExpression::UnifiedPlannerbecomesExpression::Planner.unified_*tests take the names of the tests they replace (sql_lowering.rs,promql_lowering.rs,promql_conformance.rs,histogram_metadata.rs,scalar_design.rs,support.rs,common/,precompute.rs,node_ids.rs; MetricsQLlowering_semantics.rs).crates/asap-physical-operators/README.mdis corrected:physical_planner::compiletakes a PlannerPhysicalASAPDAG(notPostAsapDAG), the separateunified_physical_plannerparagraph is folded in, and the module list saysevaluationinstead ofreadout.tools/verify_metricsql_external_consumer.shcallslower_metricsqlwith the new ingestion-interval argument and removes its temporary crate on exit.default_rollup-without-range test is removed (rollups_without_an_explicit_range_are_rejectedcovers it).How
Three commits:
git mvand update imports. Viewed per commit, GitHub shows the moved files as renames (R100 or near).Before this PR
The unified code lives at
…::unified,unified_physical_planner,unified_sources, next to dead legacy frontend modules whose root functions still returnQueryExpr.After this PR
One SQL, PromQL and MetricsQL frontend at each crate root, and one
physical_planner. Callers import from the roots. Public API changes at the crate roots (the root functions now have the formerunifiedsignatures):lower_sql,lower_sql_dialectreturnRc<OperatorNode>;lower_sql_batchreturnsVec<Result<Rc<OperatorNode>, SqlError>>(previouslyQueryExpr).lower_promql_workloadandlower_promql_workload_with_histogramsreturnVec<Rc<OperatorNode>>;lower_promql_query_workloadandlower_promql_query_workload_with_histograms(returningVec<QueryRoot>) are new at the root.lower_metricsql(query, accuracy, ingestion_interval: Duration)returnsRc<OperatorNode>(previously(query, accuracy)→QueryExpr);lower_metricsql_query(→QueryRoot) andlower_metricsql_query_workload(→Vec<QueryRoot>) are new at the root.unified_physical_planner→physical_planner,unified_sources→sources,Expression::UnifiedPlanner→Expression::Planner.unifiedmodules no longer exist.Evidence
Not applicable (no behavior change). The commit-by-commit diff shows the renames.
Verification
cargo fmt --check; workspace all-target Clippy with-D warnings;cargo test --workspace(1,714 passed, 0 failed, 2 ignored); dag-viewertest_render(31 passed);tools/verify_metricsql_external_consumer.shOK.Architectural decisions
Limitations and follow-up
QueryExpr/SummaryExprIRs.Stack: tracker #528 · main → #542 → #665 → #666 → #543 → #667 → #561.
Human review — do not complete with an agent
🤖 Generated with Claude Code
https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW