feat(r/sedonadb): Add spatial join syntax and join type helpers#814
Merged
Conversation
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the R sedonadb API with dplyr-style join helper functions and spatial join shorthands, and updates the join-expression machinery so spatial predicates can participate in default join column selection.
Changes:
- Added R join helpers such as
sd_left_join(),sd_right_join(),sd_inner_join(),sd_full_join(),sd_semi_join(),sd_anti_join(), andsd_cross_join(), plus a newkeepargument onsd_join(). - Added spatial join helpers (
sd_join_intersects(),sd_join_contains(), etc.),.tablespronoun support, andx$geom()/y$geom()shorthand handling in join expressions. - Updated expression parsing and tests/docs to support treating spatial predicate calls as join-key-like expressions for default projection behavior.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
r/sedonadb/tests/testthat/test-pkg-dplyr.R |
Swaps direct sd_join() calls for helper joins and adds keep = TRUE parity checks vs dplyr. |
r/sedonadb/tests/testthat/test-join-expression.R |
Adds coverage for .tables, geom() shorthand, spatial function parsing, and renamed join-key extraction helper. |
r/sedonadb/tests/testthat/test-expression.R |
Expands expression parsing tests to cover scalar-function calls as binary-like expressions. |
r/sedonadb/tests/testthat/test-dataframe.R |
Removes join tests that were moved into a dedicated join-focused test file. |
r/sedonadb/tests/testthat/test-dataframe-join.R |
New join test file covering select behavior, join types, and default geometry-column selection for spatial joins. |
r/sedonadb/tests/testthat/_snaps/join-expression.md |
Updates snapshots for new join-expression evaluation cases and errors. |
r/sedonadb/src/rust/src/expression.rs |
Extends parse_binary() to expose scalar functions with 2+ args as binary-like parsed expressions. |
r/sedonadb/R/join-expression.R |
Adds spatial join helper APIs, .tables, geom() handling, join-function evaluation changes, and new default-select logic. |
r/sedonadb/R/dataframe.R |
Removes the original sd_join() implementation after moving join logic into a dedicated file. |
r/sedonadb/R/dataframe-join.R |
New home for sd_join() plus new dplyr-style join helper wrappers and keep support. |
r/sedonadb/NAMESPACE |
Exports the new join helpers, .tables, and $ method for sedonadb_table_ref. |
r/sedonadb/man/sd_join.Rd |
Regenerated docs for join helpers and the new keep argument. |
r/sedonadb/man/sd_join_by.Rd |
Regenerated docs for spatial join shorthands and .tables/geom() join-expression syntax. |
r/sedonadb/man/dot-tables.Rd |
Adds documentation for the exported .tables pronoun. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 11 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds friendlier syntax for using geometry columns as join conditions, including helpers for joining by spatial predicates:
Created on 2026-05-04 with reprex v2.1.1