From: Tomas Vondra Date: Sun, 22 Jan 2017 18:06:42 +0000 (+0100) Subject: remove the 'distribution' field from SubqueryScanPath X-Git-Tag: XL_10_R1BETA1~409 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=c6f1dc34e84341b7b5ddaa082f162755edec727c;p=postgres-xl.git remove the 'distribution' field from SubqueryScanPath Considering there's a distribution field in every Path (which the SubqueryScanPath includes), this seems unnecessary and quite confusing, because sometimes we work with (Path*) directly, and sometimes through the 'path' field. It took me quite a bit of time to realize that when create_subqueryscan_path does pathnode->distribution = X it's not the same as doing pathnode->path.distribution = X Note: It's possible that we in fact need the separate field for somehow transformed distribution? --- diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index cbec3cd34f..ae8faf3a2a 100644 --- a/src/backend/optimizer/util/pathnode.c +++ b/src/backend/optimizer/util/pathnode.c @@ -3066,7 +3066,7 @@ create_subqueryscan_path(PlannerInfo *root, RelOptInfo *rel, Path *subpath, SubqueryScanPath *pathnode = makeNode(SubqueryScanPath); #ifdef XCP - pathnode->distribution = distribution; + pathnode->path.distribution = distribution; #endif pathnode->path.pathtype = T_SubqueryScan; pathnode->path.parent = rel; diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h index 77554872a6..c0bd1a7bc8 100644 --- a/src/include/nodes/relation.h +++ b/src/include/nodes/relation.h @@ -1077,7 +1077,6 @@ typedef struct SubqueryScanPath { Path path; Path *subpath; /* path representing subquery execution */ - Distribution *distribution; /* result distribution */ } SubqueryScanPath; /*