Skip to content

Migrate file footer summaries to aggregate results - #10236

Closed
connortsui20 wants to merge 1 commit into
ct/stats-array-cachefrom
ct/stats-footer-results
Closed

connortsui20 wants to merge 1 commit into
ct/stats-array-cachefrom
ct/stats-footer-results

Conversation

@connortsui20

@connortsui20 connortsui20 commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Superseded by #10265, which groups this change with the related statistics work. The original commits and branch are preserved.

Original PR description

Tracking Issue: #10177

Summary

File summaries are finalized answers, but their current StatsSet representation ties them to the legacy fixed-stat API and cannot represent known nulls. Moving the footer owner to aggregate results separates persisted metadata from the accumulator states used to compute it.

Changes

Convert historical footer fields directly into aggregate-keyed results and update their file, DataFusion, DuckDB, and JNI consumers together. A compatibility codec retains the existing wire fields, historical scalar types, precision, and missing values. The writer converts its existing statistics output once when constructing the footer.

For review, start with the compatibility codec and FileStatistics, then follow the consumer changes. Writer selection and streaming accumulation migrate in the next layer.

API Changes

FileStatistics constructors and field accessors now use AggregateResults. results() replaces stats_sets(), and lookups use aggregate functions including their options.

Stack

Migration stack #10229, in review order: #10226 → #10227 → #10232 → #10235 → #10236 → #10252 → #10253 → #10257 → #10258 → #10259 → #10260 → #10261. Independent fixes: file Sum overflow #10228 and empty Constant aggregate states #10254.

@codspeed

codspeed Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Merging this PR will improve performance by 12.73%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
✅ 2102 untouched benchmarks
⏩ 503 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
⚡ Simulation compress_fsst[(200, 16, 8)] 182.9 µs 162.3 µs +12.73%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing ct/stats-footer-results (5b899f1) with ct/stats-array-cache (1643e97)

Open in CodSpeed

Footnotes

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/break A breaking API change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant