/** * Try to match the given operator pattern.. * * @param operator the operator that should be matched with the operator pattern */ private void attemptMatchFrom(Operator operator, InputSlot<?> fromInputSlot, OutputSlot<?> fromOutputSlot) { Validate.isTrue(fromInputSlot == null, "Cannot handle downstream traversals."); // Try to make a match starting from the currently visited operator. final SubplanMatch subplanMatch = new SubplanMatch(SubplanPattern.this); this.match(SubplanPattern.this.outputPattern, operator, fromOutputSlot, subplanMatch); }
final OutputSlot<?> occupant = outerInputSlot.getOccupant(); if (occupant != null) { this.match(inputOperatorPattern, occupant.getOwner(), occupant, subplanMatch);
/** * Match this pattern against a plan. * * @param plan the plan to match against * @param minEpoch the (inclusive) minimum epoch value for matched subplans * @return all matches */ public List<SubplanMatch> match(RheemPlan plan, int minEpoch) { return new Matcher(minEpoch).match(plan); }