Skip to content

Wire the HLL confidence model into Stage 1 sizing and plan selection #678

Closed

Description

@zzylol

ClassicHllConfidence (accuracy/estimators/hll.rs, kept by #676) gives classic HLL an (ε, δ) guarantee and picks its precision, given a deployment-supplied bound on the number of distinct items per evaluation (EstimatorContract::ClassicHll { max_distinct_per_evaluation }). The legacy search used it; the Stage 1 → Stage 3 pipeline does not. Today Pass 1 sizes HLL by error rate only, and HLL has "failure probability None", so plan selection rejects it for any (ε, δ) target unless the deployment supplies output evidence.

To do

  • Accept the distinct-count bound as a deployment input. Keep the planner deployment-agnostic: the bound arrives as an input, not as built-in knowledge.
  • Use it in Stage 1 composition to size HLL (precision) and to set its theoretical guarantee.
  • Plan selection then accepts HLL when the guarantee meets the target.
  • Test: Example 2's HLL candidate becomes valid with a bound and stays invalid without one.

Found in the #676 capability audit.

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

Metadata

Metadata

Assignees

No one assigned

    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