This is an automated email from the ASF dual-hosted git repository.
chenjinbao1989 pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/cbdb-postgres-merge by this
push:
new 5b1c5b54eee Consider JOIN_RIGHT_ANTI in locus
5b1c5b54eee is described below
commit 5b1c5b54eee4a4dfc70b5835ae97644c5efa4819
Author: Jinbao Chen <[email protected]>
AuthorDate: Wed Nov 19 09:51:18 2025 +0800
Consider JOIN_RIGHT_ANTI in locus
---
src/backend/cdb/cdbpath.c | 3 ++-
src/backend/cdb/cdbpathlocus.c | 6 ++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/backend/cdb/cdbpath.c b/src/backend/cdb/cdbpath.c
index 0a3b437d696..153851c37d5 100644
--- a/src/backend/cdb/cdbpath.c
+++ b/src/backend/cdb/cdbpath.c
@@ -1464,10 +1464,10 @@ cdbpath_motion_for_join(PlannerInfo *root,
case JOIN_ANTI:
case JOIN_LEFT:
case JOIN_LASJ_NOTIN:
- case JOIN_RIGHT_ANTI:
outer.ok_to_replicate = false;
break;
case JOIN_RIGHT:
+ case JOIN_RIGHT_ANTI:
inner.ok_to_replicate = false;
break;
case JOIN_FULL:
@@ -3106,6 +3106,7 @@ cdbpath_motion_for_parallel_join(PlannerInfo *root,
case JOIN_UNIQUE_OUTER:
case JOIN_UNIQUE_INNER:
case JOIN_RIGHT:
+ case JOIN_RIGHT_ANTI:
case JOIN_FULL:
/* Join types are not supported in parallel yet. */
goto fail;
diff --git a/src/backend/cdb/cdbpathlocus.c b/src/backend/cdb/cdbpathlocus.c
index b765c742e0d..fdbd9550c05 100644
--- a/src/backend/cdb/cdbpathlocus.c
+++ b/src/backend/cdb/cdbpathlocus.c
@@ -838,7 +838,8 @@ cdbpathlocus_join(JoinType jointype, CdbPathLocus a,
CdbPathLocus b)
{
resultlocus = a;
}
- else if (jointype == JOIN_RIGHT)
+ else if (jointype == JOIN_RIGHT ||
+ jointype == JOIN_RIGHT_ANTI)
{
resultlocus = b;
}
@@ -1426,7 +1427,8 @@ cdbpathlocus_parallel_join(JoinType jointype,
CdbPathLocus a, CdbPathLocus b, bo
{
resultlocus = a;
}
- else if (jointype == JOIN_RIGHT)
+ else if (jointype == JOIN_RIGHT ||
+ jointype == JOIN_RIGHT_ANTI)
{
resultlocus = b;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]