Skip to content

Conversation

@Kontinuation
Copy link
Member

This patch updates join_utils.rs to support RightMark join. Spatial join tests for all join types were enabled.

@Kontinuation Kontinuation requested a review from Copilot January 14, 2026 15:29
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 support for RightMark joins to the Rust spatial join implementation and enables previously commented-out tests for all spatial join types. The changes align the implementation with DataFusion 50.2.0.

Changes:

  • Added RightMark join handling in join utilities to compute mark indices from the build side
  • Updated function signatures to accept join_type parameter for proper mark column generation
  • Enabled comprehensive spatial join tests for all join types (Semi, Anti, and Mark variants)

Reviewed changes

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

File Description
rust/sedona-spatial-join/src/utils/join_utils.rs Added RightMark join logic, refactored bitmap building, updated to DataFusion 50.2.0, changed return type of asymmetric_join_output_partitioning
rust/sedona-spatial-join/src/stream.rs Added join_type parameter to build_batch_from_indices calls
rust/sedona-spatial-join/src/exec.rs Updated asymmetric_join_output_partitioning calls with error handling, enabled all join type tests, added mark join test implementation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Kontinuation Kontinuation marked this pull request as ready for review January 14, 2026 16:34
Copy link
Member

@paleolimbot paleolimbot left a comment

Choose a reason for hiding this comment

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

Thank you!

This would also benefit from a Python integration/sanity for each join type while you're here.

Comment on lines +370 to +376
pub(crate) fn get_mark_indices<T: ArrowPrimitiveType, R: ArrowPrimitiveType>(
range: &Range<usize>,
input_indices: &PrimitiveArray<T>,
) -> PrimitiveArray<R>
where
NativeAdapter<T>: From<<T as ArrowPrimitiveType>::Native>,
{
Copy link
Member

Choose a reason for hiding this comment

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

It would help (me + future llms) to have a comment on what exactly this is doing (outputting an array consisting of all zeroes where some of the values are null?).

Does it need to be generic on Range and the primitive type? (might be much easier to read if one can assume these are just int64s).

Copy link
Member Author

Choose a reason for hiding this comment

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

I have commented this function. I'd like to keep the generic interface as-is, in order to be consistent with the original DataFusion code.

@Kontinuation
Copy link
Member Author

Python integration tests were added for SEMI/ANIT/MARK joins in 1051f5a.

@Kontinuation Kontinuation merged commit 931558e into apache:main Jan 15, 2026
15 checks passed
pwrliang pushed a commit to pwrliang/sedona-db that referenced this pull request Jan 15, 2026
… tests for all kinds of spatial joins (apache#514)

This patch updates join_utils.rs to support RightMark join. Spatial join tests for all join types were enabled.
@paleolimbot paleolimbot added this to the 0.3.0 milestone Jan 26, 2026
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