mondrian.olap.fun
Class SetFunDef.ListSetCalc

java.lang.Object
  extended by mondrian.calc.impl.AbstractCalc
      extended by mondrian.calc.impl.AbstractListCalc
          extended by mondrian.olap.fun.SetFunDef.ListSetCalc
All Implemented Interfaces:
Calc, ListCalc, MemberListCalc, TupleListCalc
Enclosing class:
SetFunDef

public static class SetFunDef.ListSetCalc
extends AbstractListCalc

Compiled expression to implement the MDX set function, { ... }.

The set function can contain expressions which yield sets together with expressions which yield individual members/tuples, provided that they all have the same type. It automatically removes null members or partially-null tuples from the list.

The implementation uses VoidCalc objects with side-effects to avoid generating lots of intermediate lists.

 

Field Summary
 
Fields inherited from class mondrian.calc.impl.AbstractCalc
exp, type
 
Constructor Summary
SetFunDef.ListSetCalc(Exp exp, Exp[] args, ExpCompiler compiler, List<ResultStyle> resultStyles)
           
 
Method Summary
 List evaluateList(Evaluator evaluator)
          Evaluates an expression to yield a list of members or tuples.
 Calc[] getCalcs()
          Returns this expression's child expressions.
 
Methods inherited from class mondrian.calc.impl.AbstractListCalc
evaluate, evaluateMemberList, evaluateTupleList, getResultStyle
 
Methods inherited from class mondrian.calc.impl.AbstractCalc
accept, anyDepends, anyDependsButFirst, butDepends, dependsOn, getArguments, getName, getType, simplifyEvaluator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface mondrian.calc.Calc
accept, dependsOn, getType
 

Constructor Detail

SetFunDef.ListSetCalc

public SetFunDef.ListSetCalc(Exp exp,
                             Exp[] args,
                             ExpCompiler compiler,
                             List<ResultStyle> resultStyles)
Method Detail

getCalcs

public Calc[] getCalcs()
Description copied from class: AbstractCalc
Returns this expression's child expressions.

Overrides:
getCalcs in class AbstractListCalc

evaluateList

public List evaluateList(Evaluator evaluator)
Description copied from interface: ListCalc
Evaluates an expression to yield a list of members or tuples.

The list is immutable if Calc.getResultStyle() yields ResultStyle.MUTABLE_LIST. Otherwise, the caller must not modify the list.

Parameters:
evaluator - Evaluation context
Returns:
A list of members or tuples, never null.

SourceForge.net_Logo