Repository navigation
Migrate statistics consumers and file summaries to aggregates - #10265
connortsui20 wants to merge 13 commits into
Conversation
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Core helpers and stat expressions should share the aggregate cache without requiring a fixed Stat slot. Preserve metadata-only lookup and recover partials through each aggregate's explicit contract, including fused MinMax results. Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Pruning should use the same aggregate requests as cached results and zone partials. Bind exact footer results through the explicit partial contract, and keep direct field facts separate from computed inputs while preserving built-in cast proofs. Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Array and encoding decisions can now read the generic cache directly. Keep the existing cached shortcuts, null handling, and fallback behavior while producer and transfer callers still use the temporary statistics facade. Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Merging this PR will degrade performance by 12.76%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | filter_powerlaw_by_mostly_true[250000] |
104 µs | 150.3 µs | -30.82% |
| ❌ | Simulation | chunked_opt_bool_canonical_into[(1000, 10)] |
59.7 µs | 69.9 µs | -14.64% |
| ⚡ | Simulation | compress_fsst[(200, 16, 8)] |
181.5 µs | 161.4 µs | +12.46% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing ct/stats-remaining-consumers (019c756) with ct/stats-aggregate-transfer (54d91e0)
Footnotes
-
503 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
Tracking Issue: #10177
Summary
Introducing a generic cache only helps if the existing callers use it. This migrates array operations, file summaries, pruning, and engine integrations together so they agree on aggregate identity, options, and precision.
Historical files already contain both array-node hints and footer summaries. Compatibility adapters translate those fields into finalized aggregate results and project representable results back onto the existing wire format. This keeps existing files readable without requiring a new edition or rewriting the data.
Changes
For review, start with
stats/compatandlayouts/file_stats, then the footer and pruning paths. The remaining changes migrate callers to those APIs. The residual legacy facade will be removed as the remaining callers and tests are converted.API Changes
File summary selection and lookup now accept aggregate functions.
stats_sets()and fixed-stat file lookups are replaced by aggregate result access. The historical FlatBuffers fields remain unchanged.Stack