Package mondrian.mdx

Examples of mondrian.mdx.ResolvedFunCall


     * @param exp Expression
     * @return Whether expression contains a call to an aggregate function.
     */
    private static boolean foundAggregateFunction(Exp exp) {
        if (exp instanceof ResolvedFunCall) {
            ResolvedFunCall resolvedFunCall = (ResolvedFunCall) exp;
            if (resolvedFunCall.getFunDef() instanceof AggregateFunDef) {
                return true;
            } else {
                for (Exp argExp : resolvedFunCall.getArgs()) {
                    if (foundAggregateFunction(argExp)) {
                        return true;
                    }
                }
            }
View Full Code Here


    protected String getName() {
        String name = lastSegment(getClass());
        if (isDigits(name)
            && exp instanceof ResolvedFunCall)
        {
            ResolvedFunCall funCall = (ResolvedFunCall) exp;
            name = funCall.getFunDef().getName();
        }
        return name;
    }
View Full Code Here

    // SqlMemberSource.RolapParentChildMemberNoClosure
    public Exp getExpression() {
        Exp exp = member.getExpression();
        if (exp instanceof ResolvedFunCall) {
            // convert any args to RolapCubeHierarchies
            ResolvedFunCall fcall = (ResolvedFunCall)exp;
            for (int i = 0; i < fcall.getArgCount(); i++) {
                if (fcall.getArg(i) instanceof HierarchyExpr) {
                    HierarchyExpr expr = (HierarchyExpr)fcall.getArg(i);
                    if (expr.getHierarchy().equals(
                            member.getHierarchy()))
                    {
                        fcall.getArgs()[i] =
                            new HierarchyExpr(this.getHierarchy());
                    }
                }
            }
        }
View Full Code Here

                    (RolapStoredMeasure) member, baseCubes, baseCubeList);
            } else if (member instanceof RolapCalculatedMember) {
                findMeasures(member.getExpression(), baseCubes, baseCubeList);
            }
        } else if (exp instanceof ResolvedFunCall) {
            ResolvedFunCall funCall = (ResolvedFunCall) exp;
            Exp [] args = funCall.getArgs();
            for (Exp arg : args) {
                findMeasures(arg, baseCubes, baseCubeList);
            }
        }
    }
View Full Code Here

        }
        final Type type = getResultType(validator, args);
        if (type == null) {
            throw Util.newInternal("could not derive type");
        }
        return new ResolvedFunCall(this, args, type);
    }
View Full Code Here

     * @param exp Expression
     * @return Whether expression contains a call to an aggregate function.
     */
    private static boolean foundAggregateFunction(Exp exp) {
        if (exp instanceof ResolvedFunCall) {
            ResolvedFunCall resolvedFunCall = (ResolvedFunCall) exp;
            if (resolvedFunCall.getFunDef() instanceof AggregateFunDef) {
                return true;
            } else {
                for (Exp argExp : resolvedFunCall.getArgs()) {
                    if (foundAggregateFunction(argExp)) {
                        return true;
                    }
                }
            }
View Full Code Here

     */
    static Scenario forMember(final RolapMember member) {
        if (isScenario(member.getHierarchy())) {
            final Formula formula = ((RolapCalculatedMember) member)
                .getFormula();
            final ResolvedFunCall resolvedFunCall =
                (ResolvedFunCall) formula.getExpression();
            final Calc calc = resolvedFunCall.getFunDef()
                .compileCall(null, null);
            return ((ScenarioCalc) calc).getScenario();
        } else {
            return null;
        }
View Full Code Here

            new SetType(
                new TupleType(
                    new Type[] {
                    new MemberType(null, null, null, null),
                    new MemberType(null, null, null, null)}));
        return new ResolvedFunCall(funDef, args, returnType);
    }
View Full Code Here

TOP

Related Classes of mondrian.mdx.ResolvedFunCall

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.