return msg;
}
@Override
public Message preProcessMessage(final BoundVariablesMessage msg) {
final BoundVariablesMessage msg_result = new BoundVariablesMessage(msg);
Set<Variable> variableSet = null;
// the variables, which are always bound are the intersection
// variables of the left hand side
for (final BasicOperator parent : this.getPrecedingOperators()) {
final OperatorIDTuple opID = parent.getOperatorIDTuple(this);
if (opID.getId() == 0) {
if (variableSet == null) {
variableSet = new HashSet<Variable>();
if(parent.getIntersectionVariables()!=null){
variableSet.addAll(parent.getIntersectionVariables());
} else {
System.err.println("Minus: Intersection variables of parent node not set!");
}
} else {
if(parent.getIntersectionVariables()!=null){
variableSet.retainAll(parent.getIntersectionVariables());
} else {
System.err.println("Minus: Intersection variables of parent node not set!");
}
}
}
}
this.intersectionVariables = variableSet;
msg_result.setVariables(this.intersectionVariables);
return msg_result;
}