Skip to content

feat(vortex-spatial): add area scalar function - #9203

Open
HarukiMoriarty wants to merge 5 commits into
nemo/geo-native-bbox-precheckfrom
nemo/geo-area
Open

feat(vortex-spatial): add area scalar function#9203
HarukiMoriarty wants to merge 5 commits into
nemo/geo-native-bbox-precheckfrom
nemo/geo-area

Conversation

@HarukiMoriarty

@HarukiMoriarty HarukiMoriarty commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a native GeoArea scalar function backed by geo::Area::unsigned_area
  • support every native geometry dtype, including zero-area point and line families and rectangular boxes
  • preserve input nullability and propagate null rows through unary columnar execution
  • give every geo scalar function a local operand validator that checks exact arity before dtype validation
  • parameterize repeated Area, Envelope, and MakeLine cases with rstest for clearer per-dtype failures and broader operand-order coverage

Semantics

This follows DuckDB ST_Area semantics over the native Vortex geometry types: point and line families return zero, polygon holes are subtracted, multipolygon component areas are summed, rectangles use width times height, and higher coordinate dimensions are ignored. WKB remains excluded because it is a storage representation rather than a native decoded geometry.

@codspeed-hq

codspeed-hq Bot commented Aug 5, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 84.01%

⚡ 1 improved benchmark
✅ 1936 untouched benchmarks
🆕 7 new benchmarks
⏩ 85 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation decompress[u64, (1000, 16)] 133.5 µs 72.6 µs +84.01%
🆕 Simulation column_x_column N/A 213.3 µs N/A
🆕 Simulation column_x_constant N/A 583.7 µs N/A
🆕 Simulation nullable_columns N/A 236.1 µs N/A
🆕 Simulation multipolygon N/A 2.7 ms N/A
🆕 Simulation nullable_polygon N/A 1.4 ms N/A
🆕 Simulation polygon_with_holes N/A 2.3 ms N/A
🆕 Simulation simple_polygon N/A 1 ms N/A

Tip

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


Comparing nemo/geo-area (2980eb4) with nemo/geo-native-bbox-precheck (1698f91)

Open in CodSpeed

Footnotes

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

@HarukiMoriarty HarukiMoriarty added the changelog/feature A new feature label Aug 5, 2026
@HarukiMoriarty
HarukiMoriarty force-pushed the nemo/geo-area branch 2 times, most recently from 40f4666 to 90ee99b Compare August 6, 2026 20:13
@HarukiMoriarty HarukiMoriarty changed the title feat(vortex-geo): add area scalar function feat(vortex-spatial): add area scalar function Aug 7, 2026
Signed-off-by: Nemo Yu <zyu379@wisc.edu>
Signed-off-by: Nemo Yu <zyu379@wisc.edu>
Signed-off-by: Nemo Yu <zyu379@wisc.edu>
Signed-off-by: Nemo Yu <zyu379@wisc.edu>
Signed-off-by: Nemo Yu <zyu379@wisc.edu>

@connortsui20 connortsui20 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really need to get my rowfn stuff in

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.

2 participants