Kontinuation commented on code in PR #563:
URL: https://github.com/apache/sedona-db/pull/563#discussion_r2748712598
##########
rust/sedona-spatial-join/src/utils/join_utils.rs:
##########
@@ -53,6 +53,28 @@ pub(crate) fn need_produce_result_in_final(join_type:
JoinType) -> bool {
)
}
+/// Determines if a bitmap is needed to track matched rows in the probe side's
"Multi" partition.
+///
+/// In a spatial partitioned join, the "Multi" partition of the probe side
overlaps with multiple
+/// partitions of the build side. Consequently, rows in the probe "Multi"
partition are processed
+/// against multiple build partitions.
+///
+/// For `Right`, `RightSemi`, `RightAnti`, and `Full` joins, we must track
whether a probe row
+/// has been matched across *any* of these interactions to correctly produce
results:
+/// - **Right/Full Outer**: Emit probe rows that never matched any build
partition (checked at the last build partition).
+/// - **Right Semi**: Emit a probe row the first time it matches, and suppress
subsequent matches (deduplication).
+/// - **Right Anti**: Emit probe rows only if they never match any build
partition (checked at the last build partition).
+pub(crate) fn need_probe_multi_partition_bitmap(join_type: JoinType) -> bool {
+ matches!(
+ join_type,
+ JoinType::Right
+ | JoinType::RightAnti
+ | JoinType::RightSemi
+ | JoinType::RightMark
+ | JoinType::Full
+ )
+}
Review Comment:
The bitmap is only needed by the MULTI partition of probe side, the name
already states that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]