You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Top-k k is a fixed constant (TOPK_K = 32); make it a per-query variable #184
sketch-bench grades every top-k row at precision@32;
the study measures top-k curves at 32 only;
rqe-optimizer prices every top-k RAQE at k = 32: heap m·32, 32 output entries, and the theory bound for the top 32.
A PromQL topk(k, …) carries its own k. A query with k > 32 is planned optimistically: lower precision and a bigger heap than priced. One with k < 32 is planned pessimistically.
Design
sketch-bench: a topk_k= config param on the heap top-k variants (default 32). The heap defaults to k, and a heap below k is refused. The answer is the heaviest k, and the comparator grades precision@k at it.
Study: top-k curves run at each k in --topk-ks (default 10, 32, 100). k ≠ 32 is keyed in the config string (topk_k=k), so k = 32 keeps its old keys.
rqe-optimizer:
Raqe.topk_k: Option<u64>, default 32;
heap = m·k, and eligibility requires heap ≥ (L/x)·k;
accuracy reads the curve at k, else at the next larger measured k; past every measured k, only the theory bound at k;
output cost is k entries.
ASAPQuery: passing the literal k into Raqe.topk_k goes into the existing ASAPQuery #804 after this lands.
The AutoSketch vs. ASAP evaluation (all top-k k = 32) is unaffected.
Activity
top-k: k is a per-query variable, not the constant 32 (#184)
top-k: k is a per-query variable (#185)