|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmondrian.calc.impl.AbstractCalc
mondrian.calc.impl.GenericCalc
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 | |
|---|---|
static Object |
aggregate(Calc calc,
Evaluator evaluator,
TupleList tupleList)
Computes an expression for each element of a list, and aggregates the result according to the evaluation context's current aggregation strategy. |
boolean |
dependsOn(Hierarchy hierarchy)
Returns whether this expression depends upon a given hierarchy. |
Object |
evaluate(Evaluator evaluator)
Evaluates this expression. |
static boolean |
isSuperSet(Member[] tuple1,
Member[] tuple2)
Returns whether tuple1 is a superset of tuple2. |
static Map<Member,Integer>[] |
membersVersusOccurencesInTuple(TupleList tupleList)
Finds member occurrences in tuple and generates a map of Members versus their occurrences in tuples. |
static TupleList |
optimizeChildren(TupleList 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 TupleList |
optimizeTupleList(Evaluator evaluator,
TupleList tupleList)
|
static TupleList |
removeOverlappingTupleEntries(TupleList 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.GenericCalc |
|---|
evaluateBoolean, evaluateDateTime, evaluateDimension, evaluateDouble, evaluateHierarchy, evaluateInteger, evaluateLevel, evaluateMember, evaluateString, evaluateTuple, evaluateVoid, numberToDouble |
| Methods inherited from class mondrian.calc.impl.AbstractCalc |
|---|
accept, anyDepends, anyDependsButFirst, butDepends, collectArguments, getArguments, getCalcs, getName, getResultStyle, getType, isWrapperFor, simplifyEvaluator, unwrap |
| 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, isWrapperFor, unwrap |
| Constructor Detail |
|---|
public AggregateFunDef.AggregateCalc(Exp exp,
ListCalc listCalc,
Calc calc)
| Method Detail |
|---|
public Object evaluate(Evaluator evaluator)
Calc
evaluator - Provides dimensional context in which to evaluate
this expression
public static Object aggregate(Calc calc,
Evaluator evaluator,
TupleList tupleList)
calc - Compiled expression to evaluate a scalarevaluator - Evaluation contexttupleList - List of members or tuples
public static TupleList optimizeTupleList(Evaluator evaluator,
TupleList tupleList)
public static TupleList removeOverlappingTupleEntries(TupleList list)
For example. A list consisting of: (Gender.[All Gender], [Product].[All Products]), (Gender.[F], [Product].[Drink]), (Gender.[M], [Product].[Food]) Can be optimized to: (Gender.[All Gender], [Product].[All Products])
list - List of tuples
public static boolean isSuperSet(Member[] tuple1,
Member[] tuple2)
tuple1 - First tupletuple2 - Second tuple
public boolean dependsOn(Hierarchy hierarchy)
CalcIf it does not depend on the hierarchy, 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 hierarchies except [Measures] and [Time].
Filter([Store].[USA].Children,
[Measures].[Unit Sales] < 50)
depends upon all hierarchies except [Store] and [Measures].
How so? Normally the scalar expression would depend upon all hierarchies
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 CalcdependsOn in class AbstractCalchierarchy - Hierarchy
public static TupleList optimizeChildren(TupleList tuples,
SchemaReader reader,
Cube baseCubeForMeasure)
E.g. List consist of: (Gender.[F], [Store].[USA]), (Gender.[F], [Store].[USA].[OR]), (Gender.[F], [Store].[USA].[CA]), (Gender.[F], [Store].[USA].[WA]), (Gender.[F], [Store].[CANADA]) (Gender.[M], [Store].[USA]), (Gender.[M], [Store].[USA].[OR]), (Gender.[M], [Store].[USA].[CA]), (Gender.[M], [Store].[USA].[WA]), (Gender.[M], [Store].[CANADA]) Can be optimized to: (Gender.[All Gender], [Store].[USA]) (Gender.[All Gender], [Store].[CANADA])
tuples - Tuplesreader - Schema readerbaseCubeForMeasure - Cube
public static Map<Member,Integer>[] membersVersusOccurencesInTuple(TupleList tupleList)
tupleList - List of tuples
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||