HAWQ-161. Port GPDB planner fixes to HAWQ Query Crashes with "Error on receive...server closed the connection unexpectedly".
HAWQ-161. Port GPDB planner fixes to HAWQ
Query Crashes with "Error on receive...server closed the connection unexpectedly".

Same issue as MPP-24563; after applying the fix for MPP-24563, this case still
failed because of assert failure in apply_shareinput_xslice. Root cause is that
cdbparallelize changes the plan but does not update the flow of the upper nodes,
therefore, once ParallelizeCorrelatedSubPlanMutator takes action, then we cannot
gurantee the correctness of the upper nodes' flow. Fix is to update the flow after
transforming the lower nodes. Note that, the function
ParallelizeCorrelatedSubPlanUpdateFlowMutator currently only handles the three
known situations, if more cases of this kind found, just twickle that function
can solve the problem.

stanlyxiang/incubator-hawq,outofmem0ry/incubator-hawq,huor/incubator-hawq,huor/incubator-hawq,lavjain/incubator-hawq,jianlirong/incubator-hawq,outofmem0ry/incubator-hawq,huor/incubator-hawq,stanlyxiang/incubator-hawq,lavjain/incubator-hawq,jianlirong/incubator-hawq,huor/incubator-hawq,huor/incubator-hawq,jianlirong/incubator-hawq,huor/incubator-hawq,stanlyxiang/incubator-hawq,wengyanqing/incubator-hawq,wengyanqing/incubator-hawq,outofmem0ry/incubator-hawq,lavjain/incubator-hawq,outofmem0ry/incubator-hawq,outofmem0ry/incubator-hawq,jianlirong/incubator-hawq,wengyanqing/incubator-hawq,lavjain/incubator-hawq,jianlirong/incubator-hawq,outofmem0ry/incubator-hawq,jianlirong/incubator-hawq,jianlirong/incubator-hawq,wengyanqing/incubator-hawq,lavjain/incubator-hawq,stanlyxiang/incubator-hawq,stanlyxiang/incubator-hawq,wengyanqing/incubator-hawq,outofmem0ry/incubator-hawq,outofmem0ry/incubator-hawq,stanlyxiang/incubator-hawq,lavjain/incubator-hawq,wengyanqing/incubator-hawq,lavjain/incubator-hawq,jianlirong/incubator-hawq,huor/incubator-hawq,wengyanqing/incubator-hawq,lavjain/incubator-hawq,stanlyxiang/incubator-hawq,wengyanqing/incubator-hawq