Skip to content

Conversation

@pwrliang
Copy link
Contributor

@pwrliang pwrliang commented Dec 12, 2025

Pull Request Description

This pull request implements GPU-based spatial joins by extending c/sedona-libgpuspatial. Specifically, spatial join queries involving Point-in-Polygon (PIP) operations can now be offloaded to the GPU's Ray-Tracing (RT) cores to significantly boost performance.

Performance Benchmarks

The following results compare performance on a g5.2xlarge instance (NVIDIA A10) against [sedona-db on an m7i.2xlarge instance](https://sedona.apache.org/spatialbench/single-node-benchmarks/#__tabbed_2_1).

SF=1

Instance Q2* Q4 Q8* Q10
g5.2xlarge 4.66s 2.05s 0.87s 3.12s
m7i.2xlarge 8.07s 8.41s 1.10s 18.79s
Speedup 1.73x 4.10x 1.26x 6.02x

SF=10

Instance Q2* Q4 Q8* Q10
g5.2xlarge 11.69s 3.84s 2.34s 29.70s
m7i.2xlarge 8.89s 7.52s 7.24s 42.02s
Speedup 0.76x 1.96x 3.09x 1.41x

Notes:


Future Roadmap

  1. Optimize Spatial Join Execution: Refine the partitioning and build-side logic.
  2. Filter Clause: Implement support for additional filter clauses.
  3. DWithin: Native implementation of ST_DWithin.
  4. Polygon-Polygon Joins: Extend support beyond PIP to include area-based joins.
  5. KNN: Implement GPU-accelerated K-Nearest Neighbors.

@jiayuasu
Copy link
Member

@pwrliang @paleolimbot the 186 commits here look crazy and all authors of these commits will become authors of this specific PR once merged. Is there a way to fix this?

@jbampton
Copy link
Member

You might be able to rebase and squash commits

@jbampton jbampton marked this pull request as draft December 12, 2025 03:22
@jbampton
Copy link
Member

Pretty sure when a committer merges this PR they can edit the commit message and log and clean it up and delete all the extra co authors. But still this creates extra work and 186 commits is not the usual workflow.

@pwrliang
Copy link
Contributor Author

@jiayuasu @jbampton Sorry for the scary commit history. I'm getting used to using git merge all the time and it brings all the commit history from the main branch. I have rebased the commits.

@jbampton
Copy link
Member

@pwrliang the pre-commit check is failing here

https://github.com/apache/sedona-db/actions/runs/20157117378/job/57861882061?pr=439

pre-commit is really a series of basic and static checks.

So have a quick read of the next two links with some docs on pre-commit:

https://github.com/apache/sedona-db/blob/main/docs/contributors-guide.md#linting

https://github.com/apache/sedona/blob/master/docs/setup/compile.md#pre-commit

Let me know if you need more help getting pre-commit working

@pwrliang
Copy link
Contributor Author

Close this PR as there's an existing one #465

@pwrliang pwrliang closed this Dec 19, 2025
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.

3 participants