This is an automated email from the ASF dual-hosted git repository.
reshke pushed a commit to branch jdejii
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/jdejii by this push:
new fcef7a9c3ea Fix JOIN motion type selection for join quals containing
outer refs
fcef7a9c3ea is described below
commit fcef7a9c3eab0f4e875604c65a825263862afed6
Author: reshke <[email protected]>
AuthorDate: Mon Aug 17 08:39:37 2026 +0000
Fix JOIN motion type selection for join quals containing outer refs
---
src/backend/optimizer/plan/initsplan.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/backend/optimizer/plan/initsplan.c
b/src/backend/optimizer/plan/initsplan.c
index b65897043ca..87e1cd03a98 100644
--- a/src/backend/optimizer/plan/initsplan.c
+++ b/src/backend/optimizer/plan/initsplan.c
@@ -2798,7 +2798,12 @@ distribute_qual_to_rels(PlannerInfo *root, Node *clause,
if (maybe_equivalence)
{
if (process_equivalence(root, &restrictinfo,
jtitem->jdomain))
+ {
+ /* Update infobut we may use in join motion
planning */
+ if (contains_outer_params((Node *)
restrictinfo->clause, root))
+
restrictinfo->contain_outer_query_references = true;
return;
+ }
/* EC rejected it, so set left_ec/right_ec the hard way
... */
if (restrictinfo->mergeopfamilies) /* EC might
have changed this */
initialize_mergeclause_eclasses(root,
restrictinfo);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]