use of mondrian.calc.impl.AbstractTupleCalc in project mondrian by pentaho.
the class NamedSetCurrentFunDef method compileCall.
public Calc compileCall(ResolvedFunCall call, ExpCompiler compiler) {
final Exp arg0 = call.getArg(0);
assert arg0 instanceof NamedSetExpr : "checked this in createCall";
final NamedSetExpr namedSetExpr = (NamedSetExpr) arg0;
if (arg0.getType().getArity() == 1) {
return new AbstractMemberCalc(call, new Calc[0]) {
public Member evaluateMember(Evaluator evaluator) {
return namedSetExpr.getEval(evaluator).currentMember();
}
};
} else {
return new AbstractTupleCalc(call, new Calc[0]) {
public Member[] evaluateTuple(Evaluator evaluator) {
return namedSetExpr.getEval(evaluator).currentTuple();
}
};
}
}
Aggregations