예제 #1
0
 @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));
   }
 }
예제 #2
0
    @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);
      }
    }
예제 #3
0
 @Override
 public void meet(Filter filter) {
   super.meet(filter);
   FilterRelocator.relocate(filter);
 }
예제 #4
0
 @Override
 public void meet(Var var) {
   if (var.getValue() == null) vars.add(var.getName());
   super.meet(var);
 }