/* // $Id: //guest/julian_hyde/mondrian/src/main/mondrian/rolap/agg/SparseSegmentDataset.java#1 $ // (C) Copyright 2002 Kana Software, Inc. // This software is subject to the terms of the Common Public License // Agreement, available at the following URL: // http://www.opensource.org/licenses/cpl.html. // (C) Copyright 2002 Kana Software, Inc. and others. // All Rights Reserved. // You must accept the terms of that agreement to use this software. // // jhyde, 21 March, 2002 */ package mondrian.rolap.agg; import mondrian.rolap.CellKey; import java.util.Hashtable; /** * A <code>SparseSegmentDataset</code> is a means of storing segment values * which is suitable when few of the combinations of keys have a value present. * * <p>The storage requirements are as follows. Key is 1 word for each * dimension. Hashtable entry is 3 words. Value is 1 word. Total space is (4 + * d) * v. (May also need hash table to ensure that values are only stored * once.)</p> * * <p>NOTE: This class is not synchronized.</p> * * @author jhyde * @since 21 March, 2002 * @version $Id: //guest/julian_hyde/mondrian/src/main/mondrian/rolap/agg/SparseSegmentDataset.java#1 $ **/ class SparseSegmentDataset implements SegmentDataset { Segment segment; Hashtable values; CellKey key = new CellKey(null); public Object get(int[] pos) { key.ordinals = pos; return values.get(key); } public double getBytes() { // assume a slot, key, and value are each 4 bytes return values.size() * 12; } } // End SparseSegmentDataset.java
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 1576 | Julian Hyde |
mondrian: fix dataset (add column customer.ordinal); create dataset for oracle; get queries working on oracle; get format strings working; refactor out new packages mondrian.rolap.agg and mondrian.rolap.sql. |