Skip to content

feat(rust/sedona-functions,c/sedona-geos): Add remaining required sedona bench functions#11

Merged
jiayuasu merged 19 commits intoapache:mainfrom
paleolimbot:add-st-funs
Sep 9, 2025
Merged

feat(rust/sedona-functions,c/sedona-geos): Add remaining required sedona bench functions#11
jiayuasu merged 19 commits intoapache:mainfrom
paleolimbot:add-st-funs

Conversation

@paleolimbot
Copy link
Member

@paleolimbot paleolimbot commented Sep 2, 2025

Apologies for stuffing these all in the same PR (I didn't think they would be as complicated as they were!). This PR adds ST_Collect(), ST_MakeLine(), and ST_ConvexHull().

A few other things were required to make these cleanly implemented:

  • Benchmark configuration for MultiPoint input (none of the existing random geometries were realistic input)
  • Iterating over geometry arrays where the array is of NULL type (happens when a SQL literal NULL makes its way to a scalar function and the scalar function calls .to_array(num_iterations).

@paleolimbot paleolimbot force-pushed the add-st-funs branch 3 times, most recently from ce9e777 to 8d28885 Compare September 5, 2025 02:13
@paleolimbot paleolimbot requested a review from Copilot September 9, 2025 14:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds three remaining sedona bench functions: ST_Collect(), ST_MakeLine(), and ST_ConvexHull() to support benchmark completeness. It also addresses technical requirements for NULL array iteration and adds MultiPoint benchmark configuration.

  • Implements ST_Collect() aggregate function for collecting geometries into multi-geometry types
  • Implements ST_MakeLine() scalar function for creating linestrings from points and other geometries
  • Implements ST_ConvexHull() scalar function using GEOS for computing convex hulls

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
rust/sedona-testing/src/benchmark_util.rs Adds MultiPoint benchmark configuration and updates geometry building methods
rust/sedona-geometry/src/types.rs Adds try_from_geom() method for GeometryTypeAndDimensions
rust/sedona-geometry/src/analyze.rs Refactors geometry analysis to use new try_from_geom() method
rust/sedona-functions/src/st_makeline.rs New ST_MakeLine() scalar function implementation
rust/sedona-functions/src/st_collect.rs New ST_Collect() aggregate function implementation
rust/sedona-functions/src/sd_format.rs Fixes trailing comma in assertion
rust/sedona-functions/src/register.rs Registers new functions in function set
rust/sedona-functions/src/lib.rs Adds module declarations for new functions
rust/sedona-functions/src/executor.rs Adds NULL array type handling for iteration
rust/sedona-functions/benches/native-functions.rs Adds benchmarks for new functions
python/sedonadb/tests/functions/test_functions.py Adds tests for ST_ConvexHull and ST_MakeLine
python/sedonadb/tests/functions/test_aggregate.py New test file for ST_Collect aggregate function
c/sedona-geos/src/st_convexhull.rs New ST_ConvexHull() implementation using GEOS
c/sedona-geos/src/register.rs Registers ST_ConvexHull in GEOS function set
c/sedona-geos/src/lib.rs Adds module declaration for ST_ConvexHull
c/sedona-geos/benches/geos-functions.rs Adds benchmark for ST_ConvexHull

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

paleolimbot and others added 2 commits September 9, 2025 09:49
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@paleolimbot paleolimbot marked this pull request as ready for review September 9, 2025 14:50
@jiayuasu jiayuasu merged commit 63057d6 into apache:main Sep 9, 2025
5 checks passed
@paleolimbot paleolimbot deleted the add-st-funs branch September 10, 2025 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants