public abstract class RolapAggregator extends EnumeratedValues.BasicValue implements Aggregator
Modifier and Type | Class and Description |
---|---|
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.
|
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.
|
Modifier and Type | Field and Description |
---|---|
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 |
description, name, ordinal
Constructor and Description |
---|
RolapAggregator(String name,
int ordinal,
boolean distinct) |
Modifier and Type | Method and Description |
---|---|
Object |
aggregate(List<Object> rawData,
Dialect.Datatype datatype)
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.
|
equals, getDescription, getName, getOrdinal, toString, unexpected
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
aggregate
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
public RolapAggregator(String name, int ordinal, boolean distinct)
public boolean isDistinct()
public String getExpression(String operand)
getExpression("emp.sal")
returns
"sum(emp.sal)"
.public RolapAggregator getNonDistinctAggregator()
public Aggregator getRollup()
getRollup
in interface Aggregator
public boolean supportsFastAggregates(Dialect.Datatype dataType)
supportsFastAggregates
in interface Aggregator
dataType
- The datatype of the object we would like to rollup.public Object aggregate(List<Object> rawData, Dialect.Datatype datatype)
Aggregator
SegmentBody
object.
Only gets called if
Aggregator.supportsFastAggregates(mondrian.spi.Dialect.Datatype)
is true.
This is only invoked for rollup operations.
aggregate
in interface Aggregator
rawData
- An array of values in its raw form, to be aggregated.Copyright © 2020 Hitachi Vantara. All rights reserved.