public Operator createReplacementSubplan(SubplanMatch subplanMatch, int epoch) { final Operator replacementSubplan = this.translate(subplanMatch, epoch); this.checkSanity(subplanMatch, replacementSubplan); this.copyNames(subplanMatch, replacementSubplan); return replacementSubplan; }
protected void copyNames(SubplanMatch subplanMatch, Operator replacementSubplan) { if (subplanMatch.getOperatorMatches().size() == 1) { final OperatorMatch operatorMatch = subplanMatch.getOperatorMatches().values().stream().findAny().get(); final Operator operator = operatorMatch.getOperator(); String operatorName; if ((operatorName = operator.getName()) != null) { this.setNameTo(operatorName, replacementSubplan); } } }
final Operator replacement = this.replacementFactory.createReplacementSubplan(match, epoch);