Skip to content

feat: Add initial spatial join support in Prestissimo using a nested loop join#25583

Open
wraymo wants to merge 1 commit into
prestodb:masterfrom
wraymo:spatial_join
Open

feat: Add initial spatial join support in Prestissimo using a nested loop join#25583
wraymo wants to merge 1 commit into
prestodb:masterfrom
wraymo:spatial_join

Conversation

@wraymo

@wraymo wraymo commented Jul 19, 2025

Copy link
Copy Markdown
Contributor

Description

This PR introduces basic support for spatial joins in Prestissimo by using the existing nested loop join mechanism. While this approach is simple and ensures correctness, it does not yet include any performance optimizations. It serves as a starting point for enabling spatial joins and will be improved in subsequent iterations.

Motivation and Context

Spatial joins are essential for many geospatial analytics use cases but are currently unsupported in Prestissimo.

Impact

Spatial join will be unlocked.

Test Plan

Verified correctness with Velox.

Contributor checklist

  • Please make sure your submission complies with our contributing guide, in particular code style and commit standards.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== RELEASE NOTES ==

Prestissimo (Native Execution) Changes
* Add spatial join support

@wraymo wraymo requested a review from a team as a code owner July 19, 2025 13:57
@libianoss libianoss requested a review from jagill July 21, 2025 16:57
@aditi-pandit aditi-pandit requested a review from czentgr July 21, 2025 22:11

@aditi-pandit aditi-pandit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@wraymo : Thanks for this code. Would it be possible to add few e2e tests in https://github.com/prestodb/presto/tree/master/presto-native-tests/src/test/java/com/facebook/presto/nativetests for simple geo/geo-spatial queries.

With reasonable tests I should be able to approve this PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You will need some code in core::PlanNodePtr VeloxQueryPlanConverterBase::toVeloxQueryPlan function as well https://github.com/prestodb/presto/blob/master/presto-native-execution/presto_cpp/main/types/PrestoToVeloxQueryPlan.cpp#L1769

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