mondrian.rolap
Class RolapAggregator.AvgFromAvg

java.lang.Object
  extended by mondrian.olap.EnumeratedValues.BasicValue
      extended by mondrian.rolap.RolapAggregator
          extended by mondrian.rolap.RolapAggregator.BaseAggor
              extended by mondrian.rolap.RolapAggregator.AvgFromAvg
All Implemented Interfaces:
Aggregator, EnumeratedValues.Value
Enclosing class:
RolapAggregator

public static class RolapAggregator.AvgFromAvg
extends RolapAggregator.BaseAggor

Aggregator used for aggregate tables implementing the average aggregator.

It uses the aggregate table fact_count column and an average measure to create the query used to generate an average:

avg == sum(column_sum * factcount) / sum(factcount).

If the fact table has both a sum and average over the same column and the aggregate table only has a average and fact count column, then the average aggregator can be generated using this aggregator.

 

Nested Class Summary
 
Nested classes/interfaces inherited from class mondrian.rolap.RolapAggregator
RolapAggregator.AvgFromAvg, RolapAggregator.AvgFromSum, RolapAggregator.BaseAggor, RolapAggregator.SumFromAvg
 
Field Summary
 
Fields inherited from class mondrian.rolap.RolapAggregator.BaseAggor
factCountExpr
 
Fields inherited from class mondrian.rolap.RolapAggregator
Avg, Count, DistinctCount, enumeration, Max, Min, Sum
 
Fields inherited from class mondrian.olap.EnumeratedValues.BasicValue
description, name, ordinal
 
Constructor Summary
RolapAggregator.AvgFromAvg(String factCountExpr)
           
 
Method Summary
 String getExpression(String operand)
          Returns the expression to apply this aggregator to an operand.
 
Methods inherited from class mondrian.rolap.RolapAggregator.BaseAggor
aggregate
 
Methods inherited from class mondrian.rolap.RolapAggregator
getNonDistinctAggregator, getRollup, isDistinct
 
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
 

Constructor Detail

RolapAggregator.AvgFromAvg

public RolapAggregator.AvgFromAvg(String factCountExpr)
Method Detail

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

SourceForge.net_Logo