|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mondrian.rolap.agg.Aggregation
public class Aggregation
A Aggregation
is a pre-computed aggregation over a set of
columns.
Rollup operations:
Representation of aggregations. Sparse and dense representations are necessary for different data sets. Should adapt automatically. Use an interface to hold the data set, so the segment doesn't care.
Suppose we have a segment {year=1997, quarter={1,2,3}, state={CA,WA}}. We want to roll up to a segment for {year=1997, state={CA,WA}}. We need to know that we have all quarters. We don't. Because year and quarter are independent, we know that we have all of the ...Suppose we have a segment specified by {region=West, state=*, year=*}, which materializes to ({West}, {CA,WA,OR}, {1997,1998}). Because state=*, we can rollup to {region=West, year=*} or {region=West, year=1997}.
The space required for a segment depends upon the dimensionality (d), cell count (c) and the value count (v). We don't count the space required for the actual values, which is the same in any scheme.
Nested Class Summary | |
---|---|
(package private) static class |
Aggregation.Axis
|
Constructor Summary | |
---|---|
Aggregation(AggregationKey aggregationKey)
Creates an Aggregation. |
Method Summary | |
---|---|
void |
flush(CacheControl cacheControl,
RolapCacheRegion cacheRegion)
|
Object |
getCellValue(RolapStar.Measure measure,
Object[] keys,
RolapAggregationManager.PinSet pinSet)
Retrieves the value identified by keys . |
RolapStar.Column[] |
getColumns()
This is called during Sql generation. |
BitKey |
getConstrainedColumnsBitKey()
Returns the BitKey for ALL columns (Measures and Levels) involved in the query. |
Date |
getCreationTimestamp()
|
RolapStar |
getStar()
This is called during Sql generation. |
void |
load(RolapStar.Column[] columns,
RolapStar.Measure[] measures,
StarColumnPredicate[] predicates,
RolapAggregationManager.PinSet pinnedSegments,
GroupingSetsCollector groupingSetsCollector)
Loads a set of segments into this aggregation, one per measure, each constrained by the same set of column values, and each pinned once. |
StarColumnPredicate[] |
optimizePredicates(RolapStar.Column[] columns,
StarColumnPredicate[] predicates)
Drops predicates, where the list of values is close to the values which would be returned anyway. |
void |
print(PrintWriter pw)
Prints the state of this Aggregation to a writer. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Aggregation(AggregationKey aggregationKey)
aggregationKey
- the key specifying the axes, the context and
the RolapStar for this AggregationMethod Detail |
---|
public Date getCreationTimestamp()
public void load(RolapStar.Column[] columns, RolapStar.Measure[] measures, StarColumnPredicate[] predicates, RolapAggregationManager.PinSet pinnedSegments, GroupingSetsCollector groupingSetsCollector)
A Column and its constraints are accessed at the same level in their respective arrays.
For example,
measures = {unit_sales, store_sales}, state = {CA, OR}, gender = unconstrained
public StarColumnPredicate[] optimizePredicates(RolapStar.Column[] columns, StarColumnPredicate[] predicates)
public String toString()
toString
in class Object
public void print(PrintWriter pw)
Aggregation
to a writer.
pw
- Writerpublic void flush(CacheControl cacheControl, RolapCacheRegion cacheRegion)
public Object getCellValue(RolapStar.Measure measure, Object[] keys, RolapAggregationManager.PinSet pinSet)
keys
.
If the requested cell is found in the loading segment, current Thread
will be blocked until segment is loaded.
If pinSet
is not null, pins the
segment which holds it. pinSet
ensures that a segment is
only pinned once.
Returns null
if no segment contains the cell.
Returns Util.nullValue
if a segment contains the cell and the
cell's value is null.
public RolapStar.Column[] getColumns()
public RolapStar getStar()
public BitKey getConstrainedColumnsBitKey()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |