Skip to content

fix: broken commutativity in join distribution deduction

Alexey Protsenko requested to merge dist_fix into main

Join node deduces the distribution of its output tuple based on the output tuples of its left and right children. The logic of deduction was broken: if we swap the children the distribution changed. So, current commit rewrites join distribution deduction.

Also we refactor some parts of the set_distribution() function. Its code style is still bad, but now it is not so horrible as before.

Merge request reports