Skip to content

Move the asap_sketchlib pin to a released sketchlib main #785

Open

Description

@zzylol

Problem, by example

ASAPPlanner pins asap_sketchlib to planner-pin/sketch-library-fixes (3f44cf1c). That branch is an old sketchlib main plus open PRs. Sketchlib main has since:

Two consequences:

  • The Planner can't take any new sketchlib fix without staying on a private branch.
  • The executor carries code that main now owns. One example is the WeightedFrequency kernel, whose sketchlib PRs were closed as redundant with main's f64 heap sketches.

Expected

The workspace pins asap_sketchlib to a released main commit (0.4.0 or later), and the executor uses main's APIs:

  • Renamed types and modules. Use main's names.

  • Serialization. Use ASAPv1 only, and drop the removed proto, portable and MessagePack paths.

  • Weighted frequency. Keyed weighted frequency and top-k use main's f64 CountMinSketch / CountSketch and their heap wrappers, with tuple keys. The executor checks:

    • weights: finite, and non-negative for Count-Min;
    • shape: rows <= MATRIX_MAX_ROWS, which gives independent row seeds and an encodable state.

    It does this until sketchlib's check_weight / try_update_weighted are released.

  • Memory charges. The executor's estimates use the library's measured or estimated memory_bytes, so it stops hand-coding them.

  • Accuracy rules. The rules that cite UnivMon's bounds stay consistent with the library version in use.

Acceptance

  • cargo test --workspace --locked passes on the new pin, and so do the executor's parity and memory tests.
  • Planner answers are unchanged on the planner-layering examples and the backend's end-to-end examples. Where an answer changes, the change is explained, for example new sketch bytes that are equal in value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions