docs: public void connectSource(int inputNumber, IntermediateResult source, JobEdge edge, int consumerNumber) {
  
  		final DistributionPattern pattern = edge.getDistributionPattern();
  		final IntermediateResultPartition[] sourcePartitions = source.getPartitions();
  
  		ExecutionEdge[] edges;
  
  		switch (pattern) {
  			case POINTWISE:
  				edges = connectPointwise(sourcePartitions, inputNumber);
  				break;
  
  			case ALL_TO_ALL:
  				edges = connectAllToAll(sourcePartitions, inputNumber);
  				break;
  
  			default:
  				throw new RuntimeException("Unrecognized distribution pattern.");
  
  		}
  
  		inputEdges[inputNumber] = edges;
  
  		// add the consumers to the source
  		// for now (until the receiver initiated handshake is in place), we need to register the
  		// edges as the execution graph
  		for (ExecutionEdge ee : edges) {
  			ee.getSource().addConsumer(ee, consumerNumber);
  		}
  	}