pub fn ensure_distribution(
dist_context: DistributionContext,
config: &ConfigOptions,
) -> Result<Transformed<DistributionContext>>
Expand description
This function checks whether we need to add additional data exchange operators to satisfy distribution requirements. Since this function takes care of such requirements, we should avoid manually adding data exchange operators in other places.
This function is intended to be used in a bottom up traversal, as it can first repartition (or newly partition) at the datasources – these source partitions may be later repartitioned with additional data exchange operators.