Skip to content

Commit

Permalink
MONDRIAN: Oops!
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//open/mondrian/": change = 7857]
  • Loading branch information
julianhyde committed Oct 6, 2006
1 parent cc6c610 commit 1151096
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/main/mondrian/rolap/agg/Aggregation.java
Expand Up @@ -239,19 +239,18 @@ public synchronized ColumnConstraint[][] optimizeConstraints(

if (!done && level != null) {
// if the level members are cached, we do not need "count *"
int nMembers = -1;
SchemaReader scr = star.getSchema().getSchemaReader();
nMembers = scr.getLevelCardinalityFromCache(level);
if ( nMembers > 0 ) {
bloats[i] = constraintLength / nMembers;
int memberCount = scr.getLevelCardinality(level, true, false);
if (memberCount > 0) {
bloats[i] = constraintLength / memberCount;
done = true;
}
}

if (!done) {
bloats[i] = constraintLength / columns[i].getCardinality();
}
} // for i < newConstraintses.length
}

// build a list of constraints sorted by 'bloat factor'
ConstraintComparator comparator = new ConstraintComparator(bloats);
Expand Down

0 comments on commit 1151096

Please sign in to comment.