public class Aggregation extends Object
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.
Constructor and Description |
---|
Aggregation(AggregationKey aggregationKey)
Creates an Aggregation.
|
Modifier and Type | Method and Description |
---|---|
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(SegmentCacheManager cacheMgr,
int cellRequestCount,
RolapStar.Column[] columns,
List<RolapStar.Measure> measures,
StarColumnPredicate[] predicates,
GroupingSetsCollector groupingSetsCollector,
List<Future<Map<Segment,SegmentWithData>>> segmentFutures)
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.
|
public Aggregation(AggregationKey aggregationKey)
aggregationKey
- the key specifying the axes, the context and
the RolapStar for this Aggregationpublic Date getCreationTimestamp()
public void load(SegmentCacheManager cacheMgr, int cellRequestCount, RolapStar.Column[] columns, List<RolapStar.Measure> measures, StarColumnPredicate[] predicates, GroupingSetsCollector groupingSetsCollector, List<Future<Map<Segment,SegmentWithData>>> segmentFutures)
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
segmentFutures
- List of futures wherein each statement will place
a list of the segments it has loaded, when it
completespublic StarColumnPredicate[] optimizePredicates(RolapStar.Column[] columns, StarColumnPredicate[] predicates)
public RolapStar getStar()
public BitKey getConstrainedColumnsBitKey()
Copyright © 2019 Hitachi Vantara. All rights reserved.