Skip to content

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

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

feat(vortex-geo): add area scalar function#9203
HarukiMoriarty wants to merge 3 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 43.62%

⚡ 10 improved benchmarks
✅ 1633 untouched benchmarks
🆕 32 new benchmarks
⏩ 307 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation take_chunked_fsl_sorted[32, 64] 1,290.7 µs 559.8 µs ×2.3
Simulation take_chunked_fsl_sorted[16, 64] 916.4 µs 533.5 µs +71.8%
Simulation take_fsl_chunked_elements_sorted[32, 64] 1,075.4 µs 702.7 µs +53.04%
Simulation take_fsl_chunked_elements_random[32, 64] 1,084.6 µs 742.1 µs +46.15%
Simulation take_chunked_fsl_sorted[8, 64] 722.5 µs 507.4 µs +42.4%
Simulation take_fsl_chunked_elements_sorted[16, 64] 662.4 µs 502.4 µs +31.85%
Simulation take_fsl_chunked_elements_random[16, 64] 680.3 µs 520 µs +30.83%
Simulation take_fsl_chunked_elements_random[8, 64] 492.1 µs 407.6 µs +20.73%
Simulation take_fsl_chunked_elements_sorted[8, 64] 464.6 µs 385.3 µs +20.58%
Simulation take_chunked_fsl_random[32, 64] 1.3 ms 1.1 ms +17.81%
🆕 Simulation take[core/shuffled/primitive/nonnull/chunks=1024/indices=10000] N/A 16.3 ms N/A
🆕 Simulation take[core/shuffled/primitive/nonnull/chunks=1024/indices=100000] N/A 48.9 ms N/A
🆕 Simulation take[core/shuffled/primitive/nonnull/chunks=16/indices=10000] N/A 4 ms N/A
🆕 Simulation take[core/shuffled/primitive/nonnull/chunks=16/indices=100000] N/A 38.2 ms N/A
🆕 Simulation take[core/sorted/primitive/nonnull/chunks=1024/indices=10000] N/A 14.3 ms N/A
🆕 Simulation take[core/sorted/primitive/nonnull/chunks=1024/indices=100000] N/A 31 ms N/A
🆕 Simulation take[core/sorted/primitive/nonnull/chunks=16/indices=10000] N/A 2.7 ms N/A
🆕 Simulation take[core/sorted/primitive/nonnull/chunks=16/indices=100000] N/A 29.5 ms N/A
🆕 Simulation take[duplicates/duplicate90/primitive/nonnull/chunks=16/indices=100000] N/A 34.4 ms N/A
🆕 Simulation take[duplicates/duplicate99/primitive/nonnull/chunks=16/indices=100000] N/A 33.6 ms N/A
... ... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

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 (40f4666) with nemo/geo-native-bbox-precheck (4abcde8)2

Open in CodSpeed

Footnotes

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

  2. No successful run was found on nemo/geo-native-bbox-precheck (98e2031) during the generation of this report, so 157838c was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

Signed-off-by: Nemo Yu <zyu379@wisc.edu>
Signed-off-by: Nemo Yu <zyu379@wisc.edu>
Signed-off-by: Nemo Yu <zyu379@wisc.edu>
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