Function deltalake::datafusion::physical_plan::union::can_interleave

source ·
pub fn can_interleave<T>(inputs: impl Iterator<Item = T>) -> bool
where T: Borrow<Arc<dyn ExecutionPlan>>,
Expand description

If all the input partitions have the same Hash partition spec with the first_input_partition The InterleaveExec is partition aware.

It might be too strict here in the case that the input partition specs are compatible but not exactly the same. For example one input partition has the partition spec Hash(‘a’,‘b’,‘c’) and other has the partition spec Hash(‘a’), It is safe to derive the out partition with the spec Hash(‘a’,‘b’,‘c’).