You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In postgres planner, after top_plan having been produced, we have to
adjust the Motion type of subplans, which call cdbllize_decorate_subplans_with_motions().
If subquery has another subquery, for example, in this test case, the second subquery's
motion type is set to Gather but should be Broadcast. The root cause is that we forget
to change local subFlow when its subplan has changed.
Filter: (CASE WHEN ((count((true))) > '0'::bigint) THEN CASE WHEN ((sum((CASE WHEN ((gs_tab_2.b = gs_tab_1.b) IS NULL) THEN 1 ELSE 0 END))) = (count((true)))) THEN NULL::boolean ELSE true END ELSE false END OR (gs_tab_2.b <= 3))
299
+
-> GroupAggregate
300
+
Group Key: gs_tab_2.a, gs_tab_2.b, gs_tab_2.ctid, gs_tab_2.gp_segment_id
Join Filter: ((gs_tab_2.b = gs_tab_1.b) IS NOT FALSE)
305
+
-> Seq Scan on gs_tab gs_tab_2
306
+
-> Materialize
307
+
-> Result
308
+
-> Broadcast Motion 3:3 (slice2; segments: 3)
309
+
-> Result
310
+
Filter: (CASE WHEN ((count((true))) > '0'::bigint) THEN CASE WHEN ((sum((CASE WHEN ((gs_tab_1.c = gs_tab.c) IS NULL) THEN 1 ELSE 0 END))) = (count((true)))) THEN NULL::boolean ELSE true END ELSE false END OR (gs_tab_1.c >= 2))
311
+
-> GroupAggregate
312
+
Group Key: gs_tab_1.a, gs_tab_1.b, gs_tab_1.c, gs_tab_1.ctid, gs_tab_1.gp_segment_id
0 commit comments