Class SparseArrayColumnSource<T>

java.lang.Object
com.illumon.iris.db.v2.sources.AbstractColumnSource<T>
com.illumon.iris.db.v2.sources.SparseArrayColumnSource<T>
All Implemented Interfaces:
ChunkSource<Attributes.Values>, ChunkSource.WithPrev<Attributes.Values>, DefaultChunkSource<Attributes.Values>, DefaultChunkSource.WithPrev<Attributes.Values>, FillContextMaker, GetContextMaker, ColumnSource<T>, ElementSource<T>, FillUnordered, Releasable, WritableChunkSink<Attributes.Values>, WritableSource<T>, TupleExporter<T>, TupleSource<T>, Serializable
Direct Known Subclasses:
BooleanSparseArraySource, ByteSparseArraySource, CharacterSparseArraySource, DoubleSparseArraySource, FloatSparseArraySource, IntegerSparseArraySource, LongSparseArraySource, NanosBasedTimeSparseArraySource, ObjectSparseArraySource, ShortSparseArraySource

public abstract class SparseArrayColumnSource<T> extends AbstractColumnSource<T> implements FillUnordered, WritableSource<T>
A column source backed by arrays that may not be filled in all blocks.

To store the blocks, we use a multi-level page table like structure. Each entry that exists is complete, i.e. we never reallocate partial blocks, we always allocate the complete block. The index key is divided as follows:

DescriptionSizeBits
Block 01962-44
Block 11843-26
Block 21825-8
Index Within Block87-0

Bit 63, the sign bit, is used to indicate null (that is, all negative numbers are defined to be null)

Parallel structures are used for previous values and prevInUse. We recycle all levels of the previous blocks, so that the previous structure takes up memory only while it is in use.

See Also: