Skip to content

Track exactness of bounded min/max partials - #10699

Closed
thorfour wants to merge 1 commit into
vortex-data:developfrom
polarsignals:bounded-aggregate-exactness
Closed

thorfour wants to merge 1 commit into
vortex-data:developfrom
polarsignals:bounded-aggregate-exactness

Conversation

@thorfour

Copy link
Copy Markdown
Contributor

Split out of #9775.

Summary

  • BoundedMax/BoundedMin partial states now carry Exact/Inexact variants. A partial is Exact when no accumulated value had to be truncated to fit the byte bound.
  • New AggregateFnVTable::partial_can_satisfy hook. It defaults to can_satisfy, so an aggregate can say whether one particular partial state satisfies another aggregate. An untruncated bounded partial can satisfy exact Max/Min.
  • New DynAccumulator::can_satisfy exposes the hook on accumulators.

Why

#9775 records file statistics from aggregate partials. Today the legacy StatsSet path records untruncated string/binary min/max as exact through its truncation flag. DuckDB, the DuckLake COPY return stats and DataFusion all rely on that. Without this change those values would become inexact, and those consumers would drop them.

Checks

  • cargo clippy -p vortex-array --all-targets --all-features -- -D warnings
  • cargo +nightly-2026-09-10 fmt -p vortex-array --check
  • cargo nextest run -p vortex-array: 4481 passed
  • typos

BoundedMax and BoundedMin partials now record whether any value was
truncated to fit the byte bound. An untruncated partial can satisfy the
exact Max/Min aggregate via the new `AggregateFnVTable::partial_can_satisfy`
hook, exposed on accumulators as `DynAccumulator::can_satisfy`.

This lets file writers record untruncated string/binary extrema as exact,
matching what the legacy statistics truncation flag provides today.

Signed-off-by: Thor <thor.hansen@dash0.com>
@thorfour thorfour added the changelog/feature A new feature label Oct 22, 2026
@codspeed

codspeed Bot commented Oct 22, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 11.31%

3 warnings, 1 note

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

⚠️ 18 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚠️ Base and head ran on different runner types

Some benchmarks with significant performance changes were compared across different runner types, so the changes might not come from the code. Run base and head on the same runner type, or use CodSpeed Macro Runners for more stable results.

Learn more about Macro Runners

Open the report in CodSpeed to investigate

ℹ️ 40 benchmarks have no flamegraph

The flamegraph wasn't generated: the symbols of the profiling trace could not be resolved, because no information about the language frames was collected.

See affected benchmarks

❌ 3 regressed benchmarks
✅ 2405 untouched benchmarks
⏩ 12 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Walltime bitpack_blocked_compress_avx2 6.7 µs 7.6 µs -11.53%
❌ CPU Simulation random_i128[0.01] 5.3 µs 6 µs -11.39%
❌ CPU Simulation test_scan_filter[int] 3.1 ms 3.4 ms -11.01%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing polarsignals:bounded-aggregate-exactness (7dcbf2a) with develop (d270200)

Open in CodSpeed

Footnotes

  1. 12 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. ↩

@thorfour thorfour closed this Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant