refactor: align backend summary types with ASAPPlanner - #500
Merged
Merged
Conversation
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.
Summary
Align ASAPQuery-backend terminology and domain types with the ASAPPlanner developer guide:
SummaryFamilyTypefor the summary familySketchCategoryonly for query categorySketchAlgorithmfor an algorithm identitySketchKindonly for the validated committed algorithm + parameters choiceSummaryKind,SummaryParams, andSketchKindHandledomain typesSketchKindenum and carry PlannerSketchAlgorithmdirectlyasap_typeswhere Planner has no equivalentThe legacy protobuf
SummaryParams/SketchKindHandlenames and serializedsketch_kindkeys remain only at compatibility boundaries. They are decoded immediately into the canonical Planner types, so this PR does not break deployed wire/config formats.Runtime and E2E coverage
The migration also closes the frequency-oracle gap needed by the production E2Es:
item="..."equality matcher to PlannerSketchQuery::PointCountData/oracle coverage:
CountSketch uses an explicit weaker test-only delta because the current packed-hash runtime cannot execute Planner default depth at the selected width; production defaults are unchanged.
Validation
cargo check --workspace --all-targetscargo test --locked -p asap_types --quiet(43 passed)cargo test --locked -p control_plane --lib --quiet(615 passed)cargo test --locked -p data_plane --lib --quiet(935 passed)ASAP_E2E_CARGO_TARGET_DIR=$PWD/target ./scripts/e2e.sh sketch-oracles(5 production-binary oracle tests passed)ASAP_E2E_CARGO_TARGET_DIR=$PWD/target ./scripts/e2e.sh whole(controller -> backend -> OTLP -> PromQL passed)Terminology reference: https://github.com/ProjectASAP/ASAPPlanner/blob/main/docs/developer_docs/ASAP-aware-mapping-developer-guide.md
Follow-up to #478.