MCPcopy Create free account
hub / github.com/apache/pig / pathExists

Method pathExists

src/org/apache/pig/newplan/BaseOperatorPlan.java:471–482  ·  view source on GitHub ↗

A method to check if there is a path from a given node to another node @param from the start node for checking @param to the end node for checking @return true if path exists, false otherwise

(Operator from, Operator to)

Source from the content-addressed store, hash-verified

469 * @return true if path exists, false otherwise
470 */
471 public boolean pathExists(Operator from, Operator to) {
472 List<Operator> successors = getSuccessors( from );
473 if(successors == null || successors.size() == 0) {
474 return false;
475 }
476 for (Operator successor : successors) {
477 if( successor.equals( to ) || pathExists( successor, to ) ) {
478 return true;
479 }
480 }
481 return false;
482 }
483
484 /**
485 * Move everything below a given operator to the new operator plan. The specified operator will

Callers

nothing calls this directly

Calls 3

getSuccessorsMethod · 0.95
sizeMethod · 0.65
equalsMethod · 0.45

Tested by

no test coverage detected