Skip to content

Commit

Permalink
Fix Merge GPDB.
Browse files Browse the repository at this point in the history
Some codes do not work in CBDB after Merge from GPDB.
Fix errors and etc.

Authored-by: Zhang Mingli avamingli@gmail.com
  • Loading branch information
avamingli committed May 13, 2024
1 parent 6e0d8ef commit b786615
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/backend/optimizer/util/pathnode.c
Original file line number Diff line number Diff line change
Expand Up @@ -3648,9 +3648,9 @@ create_foreignscan_path(PlannerInfo *root, RelOptInfo *rel,
case FTEXECLOCATION_ALL_SEGMENTS:
server = GetForeignServer(rel->serverid);
if (server)
CdbPathLocus_MakeStrewn(&(pathnode->path.locus), server->num_segments);
CdbPathLocus_MakeStrewn(&(pathnode->path.locus), server->num_segments, 0);
else
CdbPathLocus_MakeStrewn(&(pathnode->path.locus), getgpsegmentCount());
CdbPathLocus_MakeStrewn(&(pathnode->path.locus), getgpsegmentCount(), 0);
break;
case FTEXECLOCATION_COORDINATOR:
CdbPathLocus_MakeEntry(&(pathnode->path.locus));
Expand Down Expand Up @@ -3718,9 +3718,9 @@ create_foreign_join_path(PlannerInfo *root, RelOptInfo *rel,
case FTEXECLOCATION_ALL_SEGMENTS:
server = GetForeignServer(rel->serverid);
if (server)
CdbPathLocus_MakeStrewn(&(pathnode->path.locus), server->num_segments);
CdbPathLocus_MakeStrewn(&(pathnode->path.locus), server->num_segments, 0);
else
CdbPathLocus_MakeStrewn(&(pathnode->path.locus), getgpsegmentCount());
CdbPathLocus_MakeStrewn(&(pathnode->path.locus), getgpsegmentCount(), 0);
break;
case FTEXECLOCATION_COORDINATOR:
CdbPathLocus_MakeEntry(&(pathnode->path.locus));
Expand Down
6 changes: 6 additions & 0 deletions src/test/regress/sql/gp_foreign_data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,9 @@ CREATE SERVER s1 FOREIGN DATA WRAPPER dummy OPTIONS (num_segments '5');

-- CHECK FOREIGN SERVER's OPTIONS
SELECT srvoptions FROM pg_foreign_server WHERE srvname = 's1';

-- start_ignore
DROP SERVER s0 CASCADE;
DROP SERVER s1 CASCADE;
DROP FOREIGN DATA WRAPPER dummy CASCADE;
-- end_ignore

0 comments on commit b786615

Please sign in to comment.