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 = 260]
  • Loading branch information
julianhyde committed Jan 3, 2003
1 parent 2424ff7 commit fb7b202
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/main/mondrian/rolap/CachePool.java
Expand Up @@ -168,7 +168,7 @@ int size()
private double tick()
{
tick++;
if (true || tick % 1000 == 0) {
if (tick % 1000 == 0) {
validate();
}
// Maintain the relation "totalDecay == 1 / (decay ^ tick)". Every time
Expand Down
12 changes: 6 additions & 6 deletions src/main/mondrian/rolap/agg/Segment.java
Expand Up @@ -73,7 +73,7 @@ public class Segment implements CachePool.Cacheable

Aggregation.Axis[] axes;
private SegmentDataset data;
private int[] pos; // workspace
private CellKey cellKey; // workspace
private double recency; // when was this segment last used?
private int pinCount;
private double cost;
Expand Down Expand Up @@ -101,7 +101,7 @@ public class Segment implements CachePool.Cacheable
axis.constraints = constraintses[i];
axis.mapKeyToOffset = new HashMap();
}
this.pos = new int[axisCount];
this.cellKey = new CellKey(new int[axisCount]);
this.desc = makeDescription();
}

Expand Down Expand Up @@ -235,7 +235,7 @@ private double getBenefit()
* (because one or more of the keys do not pass the axis criteria).
*
* <p>Note: Must be called from a synchronized context, because uses the
* <code>pos[]</code> as workspace.</p>
* <code>cellKey[]</code> as workspace.</p>
**/
Object get(Object[] keys)
{
Expand All @@ -255,14 +255,14 @@ Object get(Object[] keys)
return null;
}
}
pos[i] = integer.intValue();
cellKey.ordinals[i] = integer.intValue();
}
if (missed > 0) {
// the value should be in this segment, but isn't, because one
// or more of its keys does have any values
return Util.nullValue;
} else {
Object o = data.get(new CellKey(pos));
Object o = data.get(cellKey);
if (o == null) {
o = Util.nullValue;
}
Expand Down Expand Up @@ -400,7 +400,7 @@ static void load(Segment[] segments, Collection pinnedSegments) {
boolean sparse = useSparse((double) n, (double) rows.size());
for (int i = 0; i < segments.length; i++) {
datas[i] = sparse ?
new SparseSegmentDataset(segments[i]) :
(SegmentDataset) new SparseSegmentDataset(segments[i]) :
new DenseSegmentDataset(segments[i], new Object[n]);
}
// now convert the rows into a sparse array
Expand Down

0 comments on commit fb7b202

Please sign in to comment.