public class BitmapFileIndexMeta extends Object
Bitmap file index format (V1)
+-------------------------------------------------+-----------------
| version (1 byte) |
+-------------------------------------------------+
| row count (4 bytes int) |
+-------------------------------------------------+
| non-null value bitmap number (4 bytes int) |
+-------------------------------------------------+
| has null value (1 byte) |
+-------------------------------------------------+
| null value offset (4 bytes if has null value) | HEAD
+-------------------------------------------------+
| value 1 | offset 1 |
+-------------------------------------------------+
| value 2 | offset 2 |
+-------------------------------------------------+
| value 3 | offset 3 |
+-------------------------------------------------+
| ... |
+-------------------------------------------------+-----------------
| serialized bitmap 1 |
+-------------------------------------------------+
| serialized bitmap 2 |
+-------------------------------------------------+ BODY
| serialized bitmap 3 |
+-------------------------------------------------+
| ... |
+-------------------------------------------------+-----------------
value x: var bytes for any data type (as bitmap identifier)
offset: 4 bytes int (when it is negative, it represents that there is only one value
and its position is the inverse of the negative value)
| Modifier and Type | Class and Description |
|---|---|
static class |
BitmapFileIndexMeta.Entry
Bitmap entry.
|
static interface |
BitmapFileIndexMeta.ThrowableConsumer
functional interface.
|
static interface |
BitmapFileIndexMeta.ThrowableSupplier
functional interface.
|
| Modifier and Type | Field and Description |
|---|---|
protected Map<Object,Integer> |
bitmapLengths |
protected LinkedHashMap<Object,Integer> |
bitmapOffsets |
protected long |
bodyStart |
protected DataType |
dataType |
protected boolean |
hasNullValue |
protected int |
nonNullBitmapNumber |
protected int |
nullValueOffset |
protected Options |
options |
protected int |
rowCount |
| Constructor and Description |
|---|
BitmapFileIndexMeta(DataType dataType,
Options options) |
BitmapFileIndexMeta(DataType dataType,
Options options,
int rowCount,
int nonNullBitmapNumber,
boolean hasNullValue,
int nullValueOffset,
LinkedHashMap<Object,Integer> bitmapOffsets) |
| Modifier and Type | Method and Description |
|---|---|
void |
deserialize(SeekableInputStream seekableInputStream) |
BitmapFileIndexMeta.Entry |
findEntry(Object bitmapId)
Find entry for bitmap.
|
long |
getBodyStart() |
int |
getRowCount() |
protected java.util.function.Function<Object,Integer> |
getSerializeSizeMeasure() |
protected BitmapFileIndexMeta.ThrowableSupplier |
getValueReader(DataInput in) |
protected BitmapFileIndexMeta.ThrowableConsumer |
getValueWriter(DataOutput out) |
void |
serialize(DataOutput out) |
protected final DataType dataType
protected final Options options
protected int rowCount
protected int nonNullBitmapNumber
protected boolean hasNullValue
protected int nullValueOffset
protected LinkedHashMap<Object,Integer> bitmapOffsets
protected long bodyStart
public BitmapFileIndexMeta(DataType dataType, Options options, int rowCount, int nonNullBitmapNumber, boolean hasNullValue, int nullValueOffset, LinkedHashMap<Object,Integer> bitmapOffsets)
public int getRowCount()
public long getBodyStart()
public BitmapFileIndexMeta.Entry findEntry(Object bitmapId)
bitmapId - the bitmap identifier to be searched.BitmapFileIndexMeta.Entry which contains offset and length of bitmap if it is contained in the
index meta; otherwise `null`.public void serialize(DataOutput out) throws Exception
Exceptionpublic void deserialize(SeekableInputStream seekableInputStream) throws Exception
Exceptionprotected java.util.function.Function<Object,Integer> getSerializeSizeMeasure()
protected BitmapFileIndexMeta.ThrowableConsumer getValueWriter(DataOutput out)
protected BitmapFileIndexMeta.ThrowableSupplier getValueReader(DataInput in)
Copyright © 2023–2025 The Apache Software Foundation. All rights reserved.