static class RolapNativeTopCount.TopCountConstraint extends RolapNativeSet.SetConstraint
Modifier and Type | Field and Description |
---|---|
(package private) boolean |
ascending |
(package private) Exp |
orderByExpr |
(package private) Integer |
topCount |
args
Constructor and Description |
---|
RolapNativeTopCount.TopCountConstraint(int count,
CrossJoinArg[] args,
RolapEvaluator evaluator,
Exp orderByExpr,
boolean ascending) |
Modifier and Type | Method and Description |
---|---|
void |
addConstraint(SqlQuery sqlQuery,
RolapCube baseCube,
AggStar aggStar)
Called from LevelMembers: restricts the SQL resultset to the current
context.
|
Object |
getCacheKey()
returns a key to cache the result
|
protected boolean |
isJoinRequired()
Returns whether a join with the fact table is required.
|
getMemberChildrenConstraint
addLevelConstraint, addMemberConstraint, addMemberConstraint, getEvaluator, isValidContext, isValidContext
Exp orderByExpr
boolean ascending
public RolapNativeTopCount.TopCountConstraint(int count, CrossJoinArg[] args, RolapEvaluator evaluator, Exp orderByExpr, boolean ascending)
protected boolean isJoinRequired()
If there is a crossjoin, we need to join the fact table - even if the evaluator context is empty.
TopCount always needs to join the fact table because we want to evaluate the top count expression which involves a fact.
isJoinRequired
in class RolapNativeSet.SetConstraint
public void addConstraint(SqlQuery sqlQuery, RolapCube baseCube, AggStar aggStar)
SqlContextConstraint
addConstraint
in interface TupleConstraint
addConstraint
in class RolapNativeSet.SetConstraint
sqlQuery
- the query to modifybaseCube
- base cube for virtual cube constraintsaggStar
- aggregate star to usepublic Object getCacheKey()
RolapNativeSet.SetConstraint
getCacheKey
in interface SqlConstraint
getCacheKey
in class RolapNativeSet.SetConstraint