public static class RolapAggregator.SumFromAvg extends RolapAggregator.BaseAggor
sum == sum(column_avg * factcount)If the fact table has both a sum and average over the same column and the aggregate table only has an average and fact count column, then the sum aggregator can be generated using this aggregator.
RolapAggregator.AvgFromAvg, RolapAggregator.AvgFromSum, RolapAggregator.BaseAggor, RolapAggregator.SumFromAvg
factCountExpr
Avg, Count, DistinctCount, enumeration, Max, Min, Sum
description, name, ordinal
Constructor and Description |
---|
SumFromAvg(String factCountExpr) |
Modifier and Type | Method and Description |
---|---|
boolean |
alwaysRequiresFactColumn() |
String |
getExpression(String operand)
Returns the expression to apply this aggregator to an operand.
|
String |
getScalarExpression(String operand) |
aggregate
aggregate, getNonDistinctAggregator, getRollup, isDistinct, supportsFastAggregates
equals, getDescription, getName, getOrdinal, toString, unexpected
public SumFromAvg(String factCountExpr)
public String getExpression(String operand)
RolapAggregator
getExpression("emp.sal")
returns
"sum(emp.sal)"
.getExpression
in class RolapAggregator
public boolean alwaysRequiresFactColumn()
alwaysRequiresFactColumn
in class RolapAggregator.BaseAggor
public String getScalarExpression(String operand)
getScalarExpression
in class RolapAggregator.BaseAggor
Copyright © 2018 Hitachi Vantara. All rights reserved.