(Node *) new_inner_key,
nodes,
restrictNodes);
+
+ if (IsA(pathnode, MergePath))
+ ((MergePath*)pathnode)->innersortkeys = NIL;
}
/*
* Redistribute join by hash, and, if jointype allows, create
(Node *) new_outer_key,
nodes,
restrictNodes);
+
+ if (IsA(pathnode, MergePath))
+ ((MergePath*)pathnode)->outersortkeys = NIL;
}
targetd = makeNode(Distribution);
targetd->distributionType = distType;
*/
if (IsA(pathnode, MergePath))
{
- ((MergePath*)pathnode)->innersortkeys = NIL;
- ((MergePath*)pathnode)->outersortkeys = NIL;
+ // ((MergePath*)pathnode)->innersortkeys = NIL;
+ // ((MergePath*)pathnode)->outersortkeys = NIL;
}
/*
* relations.
*/
if (innerd)
+ {
pathnode->innerjoinpath = redistribute_path(root,
pathnode->innerjoinpath,
innerpathkeys,
NULL,
NULL,
NULL);
+
+ if (IsA(pathnode, MergePath))
+ ((MergePath*)pathnode)->innersortkeys = NIL;
+ }
+
if (outerd)
+ {
pathnode->outerjoinpath = redistribute_path(root,
pathnode->outerjoinpath,
outerpathkeys,
NULL,
NULL,
NULL);
+
+
+ if (IsA(pathnode, MergePath))
+ ((MergePath*)pathnode)->outersortkeys = NIL;
+ }
+
return alternate;
}
#endif