fn add_hash_on_top(
input: DistributionContext,
hash_exprs: Vec<Arc<dyn PhysicalExpr>>,
n_target: usize,
) -> Result<DistributionContext>Expand description
Adds a hash repartition operator:
- to increase parallelism, and/or
- to satisfy requirements of the subsequent operators.
Repartition(Hash) is added on top of operator input.
§Arguments
input: Current node.hash_exprs: Stores Physical Exprs that are used during hashing.n_target: desired target partition number, if partition number of the current executor is less than this value. Partition number will be increased.
§Returns
A Result object that contains new execution plan where the desired
distribution is satisfied by adding a Hash repartition.