Package mondrian.rolap.agg
Class AggregationKey
- java.lang.Object
-
- mondrian.rolap.agg.AggregationKey
-
public class AggregationKey extends java.lang.Object
Column context that an Aggregation is computed for.Column context has two components:
- The column constraints which define the dimentionality of an Aggregation
- An orthogonal context for which the measures are defined. This context
is sometimes referred to as the compound member predicates, and usually of
the shape:
OR(AND(column predicates))
Any column is only used in either column context or compound context, not both.
- Author:
- Rushan Chen
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.List<StarPredicate>
compoundPredicateList
List of StarPredicate (representing the predicate defining the compound member).
-
Constructor Summary
Constructors Constructor Description AggregationKey(CellRequest request)
Creates an AggregationKey.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
computeHashCode()
static int
computeHashCode(BitKey constrainedColumnsBitKey, RolapStar star, java.util.Collection<BitKey> compoundPredicateBitKeys)
(package private) static boolean
equal(java.util.List<StarPredicate> list1, java.util.List<StarPredicate> list2)
Returns whether two lists of compound predicates are equal.boolean
equals(java.lang.Object other)
java.util.List<StarPredicate>
getCompoundPredicateList()
Returns the list of compound predicates.BitKey
getConstrainedColumnsBitKey()
Returns the bitkey of columns that constrain this aggregation.RolapStar
getStar()
Returns the star.int
hashCode()
java.lang.String
toString()
-
-
-
Field Detail
-
compoundPredicateList
final java.util.List<StarPredicate> compoundPredicateList
List of StarPredicate (representing the predicate defining the compound member).In sorted order of BitKey. This ensures that the map is deternimistic (otherwise different runs generate SQL statements in different orders), and speeds up comparison.
-
-
Constructor Detail
-
AggregationKey
public AggregationKey(CellRequest request)
Creates an AggregationKey.- Parameters:
request
- Cell request
-
-
Method Detail
-
computeHashCode
public final int computeHashCode()
-
computeHashCode
public static int computeHashCode(BitKey constrainedColumnsBitKey, RolapStar star, java.util.Collection<BitKey> compoundPredicateBitKeys)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
equal
static boolean equal(java.util.List<StarPredicate> list1, java.util.List<StarPredicate> list2)
Returns whether two lists of compound predicates are equal.- Parameters:
list1
- First compound predicate maplist2
- Second compound predicate map- Returns:
- Whether compound predicate maps are equal
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getConstrainedColumnsBitKey
public final BitKey getConstrainedColumnsBitKey()
Returns the bitkey of columns that constrain this aggregation.- Returns:
- Bitkey of contraining columns
-
getStar
public final RolapStar getStar()
Returns the star.- Returns:
- Star
-
getCompoundPredicateList
public java.util.List<StarPredicate> getCompoundPredicateList()
Returns the list of compound predicates.- Returns:
- list of predicates
-
-