mondrian.rolap
Class RolapAggregator.AvgFromSum
java.lang.Object
mondrian.olap.EnumeratedValues.BasicValue
mondrian.rolap.RolapAggregator
mondrian.rolap.RolapAggregator.BaseAggor
mondrian.rolap.RolapAggregator.AvgFromSum
- All Implemented Interfaces:
- Aggregator, EnumeratedValues.Value
- Enclosing class:
- RolapAggregator
public static class RolapAggregator.AvgFromSum
- extends RolapAggregator.BaseAggor
Aggregator used for aggregate tables implementing the
average aggregator.
It uses the aggregate table fact_count column
and a sum measure to create the query used to generate an average:
avg == sum(column_sum) / sum(factcount).
If the fact table has both a sum and average over the same column and
the aggregate table only has a sum and fact count column, then the
average aggregator can be generated using this aggregator.
-
-
RolapAggregator.AvgFromSum
public RolapAggregator.AvgFromSum(String factCountExpr)
getExpression
public String getExpression(String operand)
- Description copied from class:
RolapAggregator
- Returns the expression to apply this aggregator to an operand.
For example,
getExpression("emp.sal")
returns
"sum(emp.sal)"
.
- Overrides:
getExpression
in class RolapAggregator