Repository navigation
Move the asap_sketchlib pin to a released sketchlib main #785
Description
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:
- made ASAPv1 its only serialization (docs(pre-asap): capture why resolution uses positional ColumnId, not names #241);
- renamed types (Add posterior (query-time) error estimation for CMS/CountSketch, per Chen et al. IMC'21 #239, fix: show the actual unsupported expression, not its opaque discriminant #240), e.g.
KLL→Kll; - removed L2HH and UnivMonPyramid (fix: show the actual unsupported expression, not its opaque discriminant #240);
- added f64 Count-Min and Count Sketch with candidate heaps (SQL: ClickHouse's argMax has no AggIntent representation #232, CSE: decide rule-based vs. cost-based framework for whether to actually share a detected common subexpression #237);
- ported the fixes the Planner pin carries (feat(sql): lower ClickHouse argMax/argMin to AggIntent::Extension #242, release 0.4.0 at
eb04e7f): UnivMoncheck_shapeand estimators, Hydra group totals, KMV shared reads andmemory_bytes, the lazy KLL buffer withmemory_bytes, and heap memory estimates.
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/CountSketchand 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_weightedare 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 --lockedpasses 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.
Activity