Skip to content

feat(spatial): write geometry bounding boxes to file statistics - #10837

Open
HarukiMoriarty wants to merge 1 commit into
developfrom
nemo/spatial-file-stats
Open

HarukiMoriarty wants to merge 1 commit into
developfrom
nemo/spatial-file-stats

Conversation

@HarukiMoriarty

@HarukiMoriarty HarukiMoriarty commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Spatial bounding boxes are currently stored only in zone maps. After spatial initialization, default writes now also accumulate GeometryAabb across input batches and store the file-wide bounds in the footer. Integrations such as Iceberg can retrieve the bounds by column path through FileStatistics::get_by_path and AggregateStats::get.

Builds on the arbitrary footer statistics support in #9775.

Changes

  • Add an opt-in file-statistics default hook to aggregate plugins and discover those defaults when building file accumulators.
  • Register GeometryAabb as a default file statistic for native geometry columns. The core writer uses the generic aggregate interface and existing footer format.
  • Honor explicit with_file_statistics overrides and keep plugin defaults out of the legacy statistics accumulator.

@HarukiMoriarty
HarukiMoriarty force-pushed the nemo/spatial-file-stats branch from 56f5964 to a5e57e7 Compare October 26, 2026 19:46
@codspeed

codspeed Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Merging this PR will regress 3 benchmarks

4 warnings, 2 notes

⚠️ 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

⚠️ Unable to measure the execution of 2 benchmarks

These benchmarks measured no execution time, so their results are not comparable and count as unchanged. This usually happens when the compiler removes the code under test.

Prevent compiler optimizations

See affected benchmarks

⚠️ 16 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

ℹ️ This run is excluded from the branch history

This commit was force-pushed, so this run no longer appears in the branch's performance history.

ℹ️ 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

⚡ 5 improved benchmarks
❌ 3 regressed benchmarks
✅ 2194 untouched benchmarks
⏩ 249 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Walltime mul_u16_nonnull_avx512 10.8 µs 14 µs -22.99%
❌ Walltime subtract_shapes_avx512[(32768, PerRowPerRow)] 11.6 µs 14.3 µs -19.01%
❌ Walltime mul_u32_nonnull_avx512 11.5 µs 14.1 µs -18.37%
⚡ CPU Simulation chunked_dict_primitive_canonical_into[f64, (1000, 1000, 10)] 200.9 µs 146.6 µs +37.06%
⚡ CPU Simulation test_scan_filter_to_arrow_array[int_float] 4 ms 3.5 ms +16.17%
⚡ CPU Simulation test_repeated_scan_filter[int_float] 3.9 ms 3.4 ms +13.34%
⚡ CPU Simulation test_repeated_scan_filter[int] 2.7 ms 2.4 ms +11.51%
⚡ CPU Simulation test_scan_filter_to_arrow_array[int] 2.8 ms 2.5 ms +11.27%

Tip

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


Comparing nemo/spatial-file-stats (56f5964) with develop (8fc66b8)

Open in CodSpeed

Footnotes

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

This branch has not been deployed

No deployments
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