SubhamSinghal commented on code in PR #25467:
URL: https://github.com/apache/datafusion/pull/25467#discussion_r4052513668
##########
datafusion/physical-plan/src/joins/piecewise_merge_join/exec.rs:
##########
@@ -705,8 +713,10 @@ impl ExecutionPlan for PiecewiseMergeJoinExec {
match self.join_type {
// Right existence joins never read a buffered *row*, only a
single min/max over
// the whole side, so they fold the buffered input away as it
arrives instead of
- // collecting it.
- JoinType::RightSemi | JoinType::RightAnti => {
+ // collecting it. `RightMark` decides its `mark` column with the
exact same
+ // comparison as `RightSemi`/`RightAnti` -- it just keeps every
row instead of
+ // filtering by it -- so it takes the same path.
+ JoinType::RightSemi | JoinType::RightAnti | JoinType::RightMark =>
{
Review Comment:
Addressed in 8885ca1914c081f0f5c97984d7248fcf5c18cd7d
##########
datafusion/physical-plan/src/joins/piecewise_merge_join/utils.rs:
##########
@@ -20,35 +20,13 @@ use datafusion_expr::JoinType;
// Returns boolean for whether the join is a right existence join served by
// `RightExistencePWMJStream`, which reads nothing but a single min/max off
the buffered side.
//
-// `RightMark` is deliberately excluded even though it is a right existence
join: it needs the
-// buffered side walked in order and an extra boolean column, so it must not
inherit this
-// stream's relaxed input requirements if the `try_new` gate is ever loosened.
+// `RightMark` belongs here too: deciding its mark column is the same one-key
comparison as
+// `RightSemi`/`RightAnti`, just kept instead of used to filter, so it needs
no more of the
+// buffered side than they do.
pub(super) fn is_supported_right_existence_join(join_type: JoinType) -> bool {
Review Comment:
Addressed in 8885ca1914c081f0f5c97984d7248fcf5c18cd7d
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]