@Override public void meet(Projection node) throws OptimizationException { super.meet(node); // we need to check if we have inserted some value constant // from a filter and if this is part of the projection. If yes // we need to actually project it if (!insertedValues.isEmpty()) { node.replaceWith( new ProjectionWithBindings(node.getArg(), node.getProjectionElemList(), insertedValues)); } }
@Override public void meetOther(QueryModelNode node) { if (node instanceof FilterTuple) { handleFilter((FilterTuple) node, filterExpr); } else if (node instanceof StatementTupleExpr) { // TODO check if we still can remove!!! } else { // TODO we maybe have to adjust canRemove here super.meetOther(node); } }
@Override public void meet(Filter filter) { super.meet(filter); FilterRelocator.relocate(filter); }
@Override public void meet(Var var) { if (var.getValue() == null) vars.add(var.getName()); super.meet(var); }