use of mondrian.rolap.agg.AndPredicate in project mondrian by pentaho.
the class CompoundPredicateInfo method makeSetPredicate.
private StarPredicate makeSetPredicate(final Exp exp, Evaluator evaluator) {
TupleIterable evaluatedSet = evaluator.getSetEvaluator(exp, true).evaluateTupleIterable();
ArrayList<StarPredicate> orList = new ArrayList<StarPredicate>();
OrPredicate orPredicate = null;
for (List<Member> complexSetItem : evaluatedSet) {
List<StarPredicate> andList = new ArrayList<StarPredicate>();
for (Member singleSetItem : complexSetItem) {
final List<List<Member>> singleItemList = Collections.singletonList(Collections.singletonList(singleSetItem));
StarPredicate singlePredicate = predicateFromTupleList(singleItemList, measure, evaluator).getValue();
andList.add(singlePredicate);
}
AndPredicate andPredicate = new AndPredicate(andList);
orList.add(andPredicate);
orPredicate = new OrPredicate(orList);
}
return orPredicate;
}
Aggregations