Search in sources :

Example 1 with SetType

use of mondrian.olap.type.SetType 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);
    }
}
Also used : Type(mondrian.olap.type.Type) SetType(mondrian.olap.type.SetType) SetType(mondrian.olap.type.SetType) ResolvedFunCall(mondrian.mdx.ResolvedFunCall) Exp(mondrian.olap.Exp)

Aggregations

ResolvedFunCall (mondrian.mdx.ResolvedFunCall)1 Exp (mondrian.olap.Exp)1 SetType (mondrian.olap.type.SetType)1 Type (mondrian.olap.type.Type)1