|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmondrian.olap.EnumeratedValues.BasicValue
mondrian.rolap.RolapAggregator
public abstract class RolapAggregator
Describes an aggregation operator, such as "sum" or "count".
| Nested Class Summary | |
|---|---|
static class |
RolapAggregator.AvgFromAvg
Aggregator used for aggregate tables implementing the average aggregator. |
static class |
RolapAggregator.AvgFromSum
Aggregator used for aggregate tables implementing the average aggregator. |
protected static class |
RolapAggregator.BaseAggor
This is the base class for implementing aggregators over sum and average columns in an aggregate table. |
static class |
RolapAggregator.SumFromAvg
This is an aggregator used for aggregate tables implementing the sum aggregator. |
| Field Summary | |
|---|---|
static RolapAggregator |
Avg
|
static RolapAggregator |
Count
|
static RolapAggregator |
DistinctCount
|
static EnumeratedValues<RolapAggregator> |
enumeration
List of all valid aggregation operators. |
static RolapAggregator |
Max
|
static RolapAggregator |
Min
|
static RolapAggregator |
Sum
|
| Fields inherited from class mondrian.olap.EnumeratedValues.BasicValue |
|---|
description, name, ordinal |
| Constructor Summary | |
|---|---|
RolapAggregator(String name,
int ordinal,
boolean distinct)
|
|
| Method Summary | |
|---|---|
Object |
aggregate(List<Object> rawData)
Applies this aggregator over a raw list of objects for a rollup operation. |
String |
getExpression(String operand)
Returns the expression to apply this aggregator to an operand. |
RolapAggregator |
getNonDistinctAggregator()
If this is a distinct aggregator, returns the corresponding non-distinct aggregator, otherwise throws an error. |
Aggregator |
getRollup()
Returns the aggregator used to roll up. |
boolean |
isDistinct()
|
boolean |
supportsFastAggregates(Dialect.Datatype dataType)
By default, fast rollup is not supported for all classes. |
| Methods inherited from class mondrian.olap.EnumeratedValues.BasicValue |
|---|
equals, getDescription, getName, getOrdinal, toString, unexpected |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface mondrian.olap.Aggregator |
|---|
aggregate |
| Field Detail |
|---|
public static final RolapAggregator Sum
public static final RolapAggregator Count
public static final RolapAggregator Min
public static final RolapAggregator Max
public static final RolapAggregator Avg
public static final RolapAggregator DistinctCount
public static final EnumeratedValues<RolapAggregator> enumeration
| Constructor Detail |
|---|
public RolapAggregator(String name,
int ordinal,
boolean distinct)
| Method Detail |
|---|
public boolean isDistinct()
public String getExpression(String operand)
getExpression("emp.sal") returns
"sum(emp.sal)".
public RolapAggregator getNonDistinctAggregator()
public Aggregator getRollup()
getRollup in interface Aggregatorpublic boolean supportsFastAggregates(Dialect.Datatype dataType)
supportsFastAggregates in interface AggregatordataType - The datatype of the object we would like to rollup.
public Object aggregate(List<Object> rawData)
AggregatorSegmentBody object.
Only gets called if
Aggregator.supportsFastAggregates(mondrian.spi.Dialect.Datatype) is true.
This is only invoked for rollup operations.
aggregate in interface AggregatorrawData - An array of values in its raw form, to be aggregated.
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||