Repository navigation
rqe-optimizer: exact sum/min-max/increase accumulators, CountSketch+heap and UnivMon top-k - #144
Merged
Merged
Conversation
Replace the optimizer's Freq capability with SumOrCount, MinOrMax and
RateOrIncrease, served by exact multi-subpopulation accumulators that
match ASAPQuery's Multiple{Sum,MinMax,Increase}Accumulator. Add
CountSketch+heap and UnivMon as TopK candidates. Price grouped
accumulators per group so the optimizer's card(group-by) multiply
counts each group once.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
milindsrivastava1997
requested review from
GordonYuanyc and
zzylol
and removed request for
zzylol
October 5, 2026 18:15
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
exact-max only tracked the maximum, so min_over_time queries had no candidate. Min and Max are now separate capabilities served by exact-min and exact-max (ASAPQuery's MinMax sub-types), so a min query never lands on or shares a max accumulator. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
|
is rate / increase both the same increase function? I remember they are different. |
zzylol
approved these changes
Oct 5, 2026
This was referenced Oct 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the query types the optimizer knows about and the sketches it can pick for them.
Before / after
Changes
exact-sumexact-minexact-maxexact-increaseconfigs/datagen/counter_columns.yaml): values that only go up, like real counters. It uses the data generator's existing "monotonic increase" setting, so the data generator code itself is unchanged.Files changed in aqpbm-cli and aqpbm-core
aqpbm-cli/src/rows/exact.rs(new): runs the benchmarks for the four exact versions and the two new top-k options.aqpbm-cli/src/rows/materialise.rs: can now read grouped data with each label kept separate, instead of joined into one string.aqpbm-cli/src/rows/mod.rs: connects the six new benchmark names to their code.aqpbm-core/src/accuracy/aggregate.rs(new): computes the correct sum / min / max / increase per group and compares the benchmarked answers against it.aqpbm-core/src/accuracy/mod.rs: registers the new file above.aqpbm-core/src/accuracy/subpopulation/mod.rs: lets the new file reuse an existing helper that reads each row's group.aqpbm-core/src/atomic_costs.rs: for the exact versions, divides memory and merge cost by the number of groups so costs are per group.Testing
Not included
Part of #132.
🤖 Generated with Claude Code