Conversation
zzylol
force-pushed
the
refactor/planner-physical-handoff
branch
from
September 29, 2026 19:00
827e1f6 to
486bb31
Compare
This was referenced Sep 29, 2026
Adapt native candidate installation and persistence from ceba1e5 on the test stack. Preserve SQL compiled graphs and request revision pinning from main. Share request memory and cancellation contexts, and preserve native storage resource errors instead of treating them as capability misses.
Rebasing onto #783 left code added by this branch on the old names (ResidualQueryOperator, query_plan::residual, MaintenanceDagSink, MAINTENANCE_DAG_SCHEMA_VERSION). Apply the same renames, and keep the backend subDAG scheduler deleted as this branch intends. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zzylol
force-pushed
the
refactor/planner-physical-handoff
branch
from
September 29, 2026 21:00
486bb31 to
57da03f
Compare
select_lifecycle reads only deployments[0]. Planner collects SummaryAgg nodes in pre-order, so the first deployment is the node passed in; nested source states are priced by their own select_lifecycle calls, and the backend cost model assigns one window framework to every deployment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Planner forests clone query inputs, so the 160 candidates of a 44-query workload share their root Rcs. Candidate descriptions recomputed every root's explain identity per candidate, and enumeration re-encoded every root's retained physical candidate. Memoize both by root address while all candidates are borrowed; identities, plans and manifests are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PrecomputePlan::validate and validate_catalog_contents decoded every installed DAG inside the per-materialization loop, O(materializations x DAGs) decodes. Decode lazily once per DAG; decode errors still surface only where a DAG is used. 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.
Problem
Backend shares Planner operators but still reconstructs computation in deployment and serving paths. This PR moves installed execution to Planner #462's Physical DAG handoff, without an additional Execution DAG planning layer.
Before this PR: SQL serving rebuilds physical fragments from Backend relational nodes. PromQL operators are constructed during requests, and native TopK/Rate candidates lack continuous-revision deployment coverage.
After the implemented changes: SQL retains compiled relational graphs. Connected PromQL numeric, grouping, ranking, temporal and histogram computation executes persisted Planner operators. Native physical candidates are retained before pricing and reused during installation. Rate and CMS/CountSketch heap ensembles execute through installation, Remote Write, corrected revisions and same-version recovery.
Implemented
3bff87fand exercise this path in the Backend shared-output revision test.Remaining — do not merge yet
This remains a Draft. The full migration is not complete:
Passing the implemented-path tests does not establish completion of these contracts.
Validation
3bff87f; summary projection was reproduced failing before the fix. Tests also cover connected shared-producer graphs, independent runs, dynamic labels, temporal operators and recovered certified pruning. The pruning, rollup-retention and scalar-broadcast regressions were verified failing before their fixes.28c917b6; they have not been rerun for the subsequent projection dependency update.No separate manual production deployment or remote CI success is claimed. Generated logs remain outside the repository.