SelectHandler implements Handler { public void setReduced(boolean state) { query.setReduced(state); if (state) { query.setDistinct(false); } } SelectHandler(AggregationHandler aggHandler); void setDistinct(boolean state); void setReduced(boolean state); void addVar(Var var); void addVar(String expression, Var var); void addVar(Expr expr, Var var); List<Var> getVars(); VarExprList getProject(); void addAll(SelectHandler selectHandler); @Override void setVars(Map<Var, Node> values); @Override void build();  }
@Test public void testSetReduced() { assertFalse(query.isDistinct()); assertFalse(query.isReduced()); handler.setReduced(true); assertFalse(query.isDistinct()); assertTrue(query.isReduced()); handler.setDistinct(false); assertFalse(query.isDistinct()); assertTrue(query.isReduced()); handler.setDistinct(true); assertTrue(query.isDistinct()); assertFalse(query.isReduced()); handler.setReduced(true); assertFalse(query.isDistinct()); assertTrue(query.isReduced()); handler.setReduced(false); assertFalse(query.isDistinct()); assertFalse(query.isReduced()); }