Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make BroadcastMotion if target plan's parallel < 1 when parallel aware.
When there is a parallel ware join, we always make ParallelBroadcastMotion before to guarantee all data are replicated on segments across parallel processes, even if target side's parallel workers is 0, For example, inner(Hashed, workers=0) Join outer(HashedWorkers, workers=2) when parallel aware. If we ParallelBroadcastMotion the outer side to join with inner, it will get outer(ReplicatedWorkers) Join inner(Hashed) = Join Locus(HashedWorkers, workers=0). That will cause an Assert Failure in cdbpathlocus_parallel_join(). So, we should use BroadcastMotion instead of ParallelBroadcastMotion if target side's parallel workers is 0 when parallel aware. There are no differences between BroadcastMotion and ParallelBroadcastMotion when execution if target slice's parallel workers is 0. Another benefit is we could get a better Hashed locus instead of HashedWorkers for upper join with others directly without Motion. Authored-by: Zhang Mingli avamingli@gmail.com
- Loading branch information