diff options
author | Tomas Vondra | 2017-06-08 15:18:01 +0000 |
---|---|---|
committer | Tomas Vondra | 2017-06-08 15:18:01 +0000 |
commit | 102c995d02651382da4e000ae24946e387b9be36 (patch) | |
tree | 9ef529f28ae0b4515914b32ed1daa373535aad6a | |
parent | fb1f700a4be3277085642becc027cd57a12a0356 (diff) |
Add remote subquery step to recurse_set_operations
During the initial phase of resolving 9.6 merge conflicts in the planner
we have switched back to a clean upstream code for some files (including
prepunion.c). Then we reintroduced the XL-specific bits with necessary
tweaks, caused particularly by upper-planner pathification.
We have however forgot about this bit in recurse_set_operations, so this
commit fixes that by adding the redistribution again.
This fixes failures in collate, copyselect and union regression suites.
Patch by senhu <[email protected]>, review and commit by me.
-rw-r--r-- | src/backend/optimizer/prep/prepunion.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c index 2522636392..a8163bfaff 100644 --- a/src/backend/optimizer/prep/prepunion.c +++ b/src/backend/optimizer/prep/prepunion.c @@ -313,6 +313,19 @@ recurse_set_operations(Node *setOp, PlannerInfo *root, subpath = get_cheapest_fractional_path(final_rel, root->tuple_fraction); +#ifdef XCP + /* + * create remote_subplan_path if needed, and we'll use this path to + * create remote_subplan at the top. + */ + if(subpath->distribution) + { + subpath = create_remotesubplan_path(NULL, subpath, NULL); + + subroot->distribution = NULL; + } +#endif + /* * Stick a SubqueryScanPath atop that. * |