Skip to content

Commit 1c6f6e3

Browse files
author
SAITO Masataka
committed
This commit fixes bug id #449.
The bug corrupts ANDs at the tou level of having qualification in remote query to ","(commas).
1 parent 22fdd35 commit 1c6f6e3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/backend/optimizer/plan/pgxcplan.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1664,7 +1664,9 @@ create_remotegrouping_plan(PlannerInfo *root, Plan *local_plan)
16641664
else
16651665
local_plan->qual = local_qual;
16661666

1667-
remote_scan->remote_query->havingQual = (Node *)remote_qual;
1667+
remote_scan->remote_query->havingQual =
1668+
(Node *)(remote_qual ? make_ands_explicit(remote_qual) : NULL);
1669+
16681670
/*
16691671
* Generate the targetlist to be shipped to the datanode, so that we can
16701672
* check whether we are able to ship the grouping clauses to the datanode/s.

0 commit comments

Comments
 (0)