use of mondrian.mdx.ResolvedFunCall in project mondrian by pentaho.
the class RolapResult method processMemberExpr.
private static void processMemberExpr(Object o, List<Member> exprMembers) {
if (o instanceof Member && o instanceof RolapCubeMember) {
exprMembers.add((Member) o);
} else if (o instanceof VisualTotalMember) {
VisualTotalMember member = (VisualTotalMember) o;
Exp exp = member.getExpression();
processMemberExpr(exp, exprMembers);
} else if (o instanceof Exp && !(o instanceof MemberExpr)) {
Exp exp = (Exp) o;
ResolvedFunCall funCall = (ResolvedFunCall) exp;
Exp[] exps = funCall.getArgs();
processMemberExpr(exps, exprMembers);
} else if (o instanceof Exp[]) {
Exp[] exps = (Exp[]) o;
for (Exp exp : exps) {
processMemberExpr(exp, exprMembers);
}
} else if (o instanceof MemberExpr) {
MemberExpr memberExp = (MemberExpr) o;
Member member = memberExp.getMember();
processMemberExpr(member, exprMembers);
}
}
use of mondrian.mdx.ResolvedFunCall in project mondrian by pentaho.
the class CompoundPredicateInfo method makeCalculatedMemberPredicate.
private StarPredicate makeCalculatedMemberPredicate(RolapCubeMember member, RolapCube baseCube, Evaluator evaluator) {
assert member.getExpression() instanceof ResolvedFunCall;
ResolvedFunCall fun = (ResolvedFunCall) member.getExpression();
final Exp exp = fun.getArg(0);
final Type type = exp.getType();
if (type instanceof SetType) {
return makeSetPredicate(exp, evaluator);
} else if (type.getArity() == 1) {
return makeUnaryPredicate(member, baseCube, evaluator);
} else {
throw MondrianResource.instance().UnsupportedCalculatedMember.ex(member.getName(), null);
}
}
Aggregations