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 5ae354540cc Fix some compile error for optimizer path
5ae354540cc is described below
commit 5ae354540cc67cd7afa5c1f7bef9f73c8e263077
Author: Jinbao Chen <[email protected]>
AuthorDate: Thu Sep 25 10:57:36 2025 +0800
Fix some compile error for optimizer path
---
src/backend/optimizer/path/allpaths.c | 12 ++++++------
src/backend/optimizer/path/costsize.c | 7 ++++---
src/include/access/appendonlytid.h | 1 +
src/include/commands/vacuum.h | 2 +-
src/include/nodes/nodes.h | 7 ++++---
5 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/src/backend/optimizer/path/allpaths.c
b/src/backend/optimizer/path/allpaths.c
index 3efb15af077..33d6aa26876 100644
--- a/src/backend/optimizer/path/allpaths.c
+++ b/src/backend/optimizer/path/allpaths.c
@@ -3083,7 +3083,7 @@ set_subquery_pathlist(PlannerInfo *root, RelOptInfo *rel,
subpath->pathkeys,
make_tlist_from_pathtarget(subpath->pathtarget));
- path = (Path *) create_subqueryscan_path(root, rel, subpath,
+ path = (Path *) create_subqueryscan_path(root, rel, subpath,
trivial_pathtarget,
pathkeys, locus, required_outer);
/*
@@ -3598,7 +3598,6 @@ set_cte_pathlist(PlannerInfo *root, RelOptInfo *rel,
RangeTblEntry *rte)
foreach(lc, sub_final_rel->pathlist)
{
Path *subpath = (Path *) lfirst(lc);
- List *pathkeys;
CdbPathLocus locus;
locus = cdbpathlocus_from_subquery(root, rel, subpath);
@@ -4383,8 +4382,8 @@ push_down_restrict(PlannerInfo *root, RelOptInfo *rel,
* unsafe to use in a pushed-down qual.
*/
memset(&safetyInfo, 0, sizeof(safetyInfo));
- safetyInfo.unsafeColumns = (bool *)
- palloc0((list_length(subquery->targetList) + 1) * sizeof(bool));
+ safetyInfo.unsafeFlags = (unsigned char *)
+ palloc0((list_length(subquery->targetList) + 1) *
sizeof(unsigned char));
/*
* If the subquery has the "security_barrier" flag, it means the
subquery
@@ -4422,7 +4421,7 @@ push_down_restrict(PlannerInfo *root, RelOptInfo *rel,
/* We don't bother recomputing baserestrict_min_security */
}
- pfree(safetyInfo.unsafeColumns);
+ pfree(safetyInfo.unsafeFlags);
return subquery;
}
@@ -4688,7 +4687,8 @@ check_output_expressions(Query *subquery,
pushdown_safety_info *safetyInfo)
/* Refuse subplans */
if (contain_subplans((Node *) tle->expr))
{
- safetyInfo->unsafeColumns[tle->resno] = true;
+ /*.MERGE16_FIXME: should we add a new unsafe type? */
+ safetyInfo->unsafeFlags[tle->resno] |=
UNSAFE_NOTIN_PARTITIONBY_CLAUSE;
continue;
}
}
diff --git a/src/backend/optimizer/path/costsize.c
b/src/backend/optimizer/path/costsize.c
index 72abd7280bb..2d54c863eac 100644
--- a/src/backend/optimizer/path/costsize.c
+++ b/src/backend/optimizer/path/costsize.c
@@ -1598,7 +1598,8 @@ cost_subqueryscan(SubqueryScanPath *path, PlannerInfo
*root,
qpquals,
0,
JOIN_INNER,
-
NULL));
+
NULL,
+
false));
/*
* Cost of path is cost of evaluating the subplan, plus cost of
evaluating
@@ -3328,8 +3329,8 @@ final_cost_nestloop(PlannerInfo *root, NestPath *path,
if (inner_path_rows <= 0)
inner_path_rows = 1;
- if (CdbPathLocus_IsPartitioned(path->path.locus))
- numsegments = CdbPathLocus_NumSegments(path->path.locus);
+ if (CdbPathLocus_IsPartitioned(path->jpath.path.locus))
+ numsegments = CdbPathLocus_NumSegments(path->jpath.path.locus);
else
numsegments = 1;
diff --git a/src/include/access/appendonlytid.h
b/src/include/access/appendonlytid.h
index 8ad70b6ec95..224552183ac 100755
--- a/src/include/access/appendonlytid.h
+++ b/src/include/access/appendonlytid.h
@@ -15,6 +15,7 @@
#define APPENDONLYTID_H
#include "c.h"
+#include "storage/itemptr.h"
/*
* AOTupleId is a unique tuple id, specific to AO relation tuples, of the
diff --git a/src/include/commands/vacuum.h b/src/include/commands/vacuum.h
index aeb5f1ef533..38bf39ba069 100644
--- a/src/include/commands/vacuum.h
+++ b/src/include/commands/vacuum.h
@@ -209,7 +209,7 @@ typedef enum VacuumOption
VACOPT_ROOTONLY = 1 << 10,
VACOPT_FULLSCAN = 1 << 11,
VACOPT_SKIP_DATABASE_STATS = 1 << 12,
- VACOPT_ONLY_DATABASE_STATS = 1 << 13
+ VACOPT_ONLY_DATABASE_STATS = 1 << 13,
/* AO vacuum phases. Mutually exclusive */
VACOPT_AO_PRE_CLEANUP_PHASE = 1 << 14,
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h
index 17288f7a3dd..00ba1ce18dc 100644
--- a/src/include/nodes/nodes.h
+++ b/src/include/nodes/nodes.h
@@ -690,9 +690,10 @@ typedef enum NodeTag
T_SupportRequestSelectivity, /* in nodes/supportnodes.h */
T_SupportRequestCost, /* in nodes/supportnodes.h */
T_SupportRequestRows, /* in nodes/supportnodes.h */
- T_SupportRequestIndexCondition /* in nodes/supportnodes.h */
+ T_SupportRequestIndexCondition, /* in nodes/supportnodes.h */
+ T_SupportRequestWFuncMonotonic,
+ T_SupportRequestOptimizeWindowClause,
- ,
T_StreamBitmap, /* in nodes/tidbitmap.h */
T_FormatterData, /* in access/formatter.h */
T_ExtProtocolData, /* in access/extprotocol.h */
@@ -1055,7 +1056,7 @@ typedef enum JoinType
(1 << JOIN_FULL) | \
(1 << JOIN_RIGHT) | \
(1 << JOIN_ANTI) | \
- (1 << JOIN_LASJ_NOTIN))) != 0) | \
+ (1 << JOIN_LASJ_NOTIN) | \
(1 << JOIN_RIGHT_ANTI))) != 0)
/*
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]