fn restore_required_partitioning( plan: Arc<dyn ExecutionPlan>, partitioning_to_restore: Option<Partitioning>, ) -> Result<Arc<dyn ExecutionPlan>>