Skip to content

Commit

Permalink
MONDRIAN: Fix declared dependencies of $RollupAccessibleChildren expr…
Browse files Browse the repository at this point in the history
…ession.

[git-p4: depot-paths = "//open/mondrian/": change = 11010]
  • Loading branch information
julianhyde committed May 4, 2008
1 parent c3d40b4 commit 9cd93c6
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions src/main/mondrian/rolap/RolapHierarchy.java
Expand Up @@ -581,12 +581,13 @@ public List evaluateList(Evaluator evaluator) {
evaluator,
((RolapEvaluator) evaluator).getExpanding()));
}

public boolean dependsOn(Dimension dimension) {
return true;
}
};
final Calc partialCalc =
new AggregateFunDef.AggregateCalc(
new DummyExp(returnType),
listCalc,
new ValueCalc(new DummyExp(returnType)));
new LimitedRollupAggregateCalc(returnType, listCalc);

final Exp partialExp =
new ResolvedFunCall(
Expand Down Expand Up @@ -954,6 +955,21 @@ public RolapMember desubstitute(RolapMember member) {
}
}
}

/**
* Compiled expression that computes rollup over a set of visible children.
* The {@code listCalc} expression determines that list of children.
*/
private static class LimitedRollupAggregateCalc
extends AggregateFunDef.AggregateCalc
{
public LimitedRollupAggregateCalc(Type returnType, ListCalc listCalc) {
super(
new DummyExp(returnType),
listCalc,
new ValueCalc(new DummyExp(returnType)));
}
}
}

// End RolapHierarchy.java

0 comments on commit 9cd93c6

Please sign in to comment.