|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mondrian.calc.impl.AbstractCalc mondrian.calc.impl.AbstractDoubleCalc mondrian.olap.fun.AggregateFunDef.AggregateCalc
public static class AggregateFunDef.AggregateCalc
Field Summary |
---|
Fields inherited from class mondrian.calc.impl.AbstractCalc |
---|
exp, type |
Constructor Summary | |
---|---|
AggregateFunDef.AggregateCalc(Exp exp,
ListCalc listCalc,
Calc calc)
|
Method Summary | |
---|---|
boolean |
dependsOn(Dimension dimension)
Returns whether this expression depends upon a given dimension. |
double |
evaluateDouble(Evaluator evaluator)
Evaluates this expression to yield a double value. |
Calc[] |
getCalcs()
Returns this expression's child expressions. |
static boolean |
isSuperSet(Member[] tuple1,
Member[] tuple2)
Returns whether tuple1 is a superset of tuple2 |
static List<Member[]> |
makeTupleList(List<Member> list)
Forms a list tuples from a list of members |
static Map<Member,Integer>[] |
membersVersusOccurencesInTuple(List<Member[]> tuples)
Finds member occurrences in tuple and generates a map of Members versus their occurrences in tuples. |
static List<Member[]> |
optimizeChildren(List<Member[]> tuples,
SchemaReader reader,
Cube baseCubeForMeasure)
In distinct Count aggregation, if tuple list is a result m.children * n.children then it can be optimized to m * n |
static List<Member[]> |
removeOverlappingTupleEntries(List<Member[]> list)
In case of distinct count aggregation if a tuple which is a super set of other tuples in the set exists then the child tuples can be ignored. |
Methods inherited from class mondrian.calc.impl.AbstractDoubleCalc |
---|
evaluate |
Methods inherited from class mondrian.calc.impl.AbstractCalc |
---|
accept, anyDepends, anyDependsButFirst, butDepends, getArguments, getName, getResultStyle, 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, getResultStyle, getType |
Constructor Detail |
---|
public AggregateFunDef.AggregateCalc(Exp exp, ListCalc listCalc, Calc calc)
Method Detail |
---|
public double evaluateDouble(Evaluator evaluator)
DoubleCalc
double
value.
If the result is null, returns the special
FunUtil.DoubleNull
value.
evaluator
- Evaluation context
public static List<Member[]> removeOverlappingTupleEntries(List<Member[]> list)
E.g. List consists of: (Gender.[All Gender], [Product].[All Products]), (Gender.[All Gender].[F], [Product].[All Products].[Drink]), (Gender.[All Gender].[M], [Product].[All Products].[Food]) Can be optimized to: (Gender.[All Gender], [Product].[All Products])
list
- public static boolean isSuperSet(Member[] tuple1, Member[] tuple2)
tuple1
- tuple2
-
public static List<Member[]> makeTupleList(List<Member> list)
list
- of members
public Calc[] getCalcs()
AbstractCalc
getCalcs
in class AbstractDoubleCalc
public boolean dependsOn(Dimension dimension)
Calc
If it does not depend on the dimension, then re-evaluating the expression with a different member of this context must produce the same answer.
Some examples:[Measures].[Unit Sales]
depends on all dimensions except [Measures]
.
([Measures].[Unit Sales],
[Time].[1997]) > 1000
depends on all dimensions except [Measures] and [Time].
Filter([Store].[USA].Children,
[Measures].[Unit Sales] < 50)
depends upon all dimensions except [Store] and [Measures].
How so? Normally the scalar expression would depend upon all dimensions
except [Measures], but the Filter
function sets the [Store]
context before evaluating the scalar expression, so it is not inherited
from the surrounding context.
dependsOn
in interface Calc
dependsOn
in class AbstractCalc
dimension
- Dimension
public static List<Member[]> optimizeChildren(List<Member[]> tuples, SchemaReader reader, Cube baseCubeForMeasure)
E.g. List consist of: (Gender.[All Gender].[F], [Store].[All Stores].[USA]), (Gender.[All Gender].[F], [Store].[All Stores].[USA].[OR]), (Gender.[All Gender].[F], [Store].[All Stores].[USA].[CA]), (Gender.[All Gender].[F], [Store].[All Stores].[USA].[WA]), (Gender.[All Gender].[F], [Store].[All Stores].[CANADA]) (Gender.[All Gender].[M], [Store].[All Stores].[USA]), (Gender.[All Gender].[M], [Store].[All Stores].[USA].[OR]), (Gender.[All Gender].[M], [Store].[All Stores].[USA].[CA]), (Gender.[All Gender].[M], [Store].[All Stores].[USA].[WA]), (Gender.[All Gender].[M], [Store].[All Stores].[CANADA]) Can be optimized to: (Gender.[All Gender], [Store].[All Stores].[USA]) (Gender.[All Gender], [Store].[All Stores].[CANADA])
tuples
- Tuplesreader
- Schema readerbaseCubeForMeasure
- Cube
public static Map<Member,Integer>[] membersVersusOccurencesInTuple(List<Member[]> tuples)
tuples
- List of tuples
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |