You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by ch...@apache.org on 2025/12/25 18:54:13 UTC

(cloudberry) branch cbdb-postgres-merge updated: The child relation can be null in copy

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 7032f42b2b6 The child relation can be null in copy
7032f42b2b6 is described below

commit 7032f42b2b6dfcab44709d3f5366ad1a6c25d32a
Author: Jinbao Chen <ch...@gmail.com>
AuthorDate: Fri Dec 26 02:54:03 2025 +0800

    The child relation can be null in copy
---
 src/backend/cdb/cdbpathlocus.c       | 32 ++++++++++++++++----------------
 src/backend/optimizer/plan/planner.c |  3 ++-
 2 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/src/backend/cdb/cdbpathlocus.c b/src/backend/cdb/cdbpathlocus.c
index fdbd9550c05..af6cbe0bd45 100644
--- a/src/backend/cdb/cdbpathlocus.c
+++ b/src/backend/cdb/cdbpathlocus.c
@@ -1058,21 +1058,21 @@ cdbpathlocus_is_hashed_on_tlist(CdbPathLocus locus, List *tlist,
 				if (ignore_constants && CdbEquivClassIsConstant(dk_eclass))
 					continue;
 
-				if (dk_eclass->ec_sortref != 0)
-				{
-					foreach(i, tlist)
-					{
-						TargetEntry *tle = (TargetEntry *) lfirst(i);
-
-						if (tle->ressortgroupref == dk_eclass->ec_sortref)
-						{
-							found = true;
-							break;
-						}
-					}
-				}
-				else
-				{
+//				if (dk_eclass->ec_sortref != 0)
+//				{
+//					foreach(i, tlist)
+//					{
+//						TargetEntry *tle = (TargetEntry *) lfirst(i);
+//
+//						if (tle->ressortgroupref == dk_eclass->ec_sortref)
+//						{
+//							found = true;
+//							break;
+//						}
+//					}
+//				}
+//				else
+//				{
 					foreach(i, dk_eclass->ec_members)
 					{
 						EquivalenceMember *em = (EquivalenceMember *) lfirst(i);
@@ -1091,7 +1091,7 @@ cdbpathlocus_is_hashed_on_tlist(CdbPathLocus locus, List *tlist,
 						if (found)
 							break;
 					}
-				}
+//				}
 				if (!found)
 					return false;
 			}
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
index 527a4136e69..3bd7e5edb3c 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -9380,7 +9380,8 @@ apply_scanjoin_target_to_paths(PlannerInfo *root,
 			int			nappinfos;
 			List	   *child_scanjoin_targets = NIL;
 
-			Assert(child_rel != NULL);
+			if (child_rel == NULL)
+				continue;
 
 			/* Dummy children can be ignored. */
 			if (IS_DUMMY_REL(child_rel))


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org