Skip to content

[Refactor] Centralize planner and backend accuracy formulas #707

Description

@milindsrivastava1997

What to build

Centralize the shared CMS, HLL, KLL, and DDSketch accuracy formulas in asap_types, with a small interface over normalized family parameters. The control plane and data plane should retain only their source-specific parameter extraction and any backend-only augmentation, then derive the same AccuracyProfile through the shared formulas.

This removes the current duplicated policy logic while preserving the physical-plan compile, publish, install, and serving behavior.

Acceptance criteria

  • Each shared sketch-family formula has one authoritative implementation in asap_types.
  • Control-plane planning and data-plane serving derive equivalent AccuracyProfile values for identical normalized CMS, HLL, KLL, and DDSketch inputs.
  • Backend-specific behavior remains outside the shared formula module and is covered by focused tests.
  • A cross-crate parity test covers representative parameters for every supported shared family.
  • Existing physical-plan and query-serving tests continue to pass.

Blocked by

None - can start immediately

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions