public abstract class BinarySection extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static long |
HIGHEST_FIRST_BIT
To get the mark in highest bit of long.
|
static long |
HIGHEST_SECOND_TO_EIGHTH_BIT
To get the 7 bits length in second bit to eighth bit out of a long.
|
static int |
MAX_FIX_PART_DATA_SIZE
It decides whether to put data in FixLenPart or VarLenPart.
|
protected int |
offset |
protected MemorySegment[] |
segments |
protected int |
sizeInBytes |
Constructor and Description |
---|
BinarySection() |
BinarySection(MemorySegment[] segments,
int offset,
int sizeInBytes) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
getOffset() |
MemorySegment[] |
getSegments() |
int |
getSizeInBytes() |
int |
hashCode() |
void |
pointTo(MemorySegment[] segments,
int offset,
int sizeInBytes) |
void |
pointTo(MemorySegment segment,
int offset,
int sizeInBytes) |
byte[] |
toBytes() |
public static final int MAX_FIX_PART_DATA_SIZE
BinaryRow
.
If len is less than 8, its binary format is: 1-bit mark(1) = 1, 7-bits len, and 7-bytes data. Data is stored in fix-length part.
If len is greater or equal to 8, its binary format is: 1-bit mark(1) = 0, 31-bits offset to the data, and 4-bytes length of data. Data is stored in variable-length part.
public static final long HIGHEST_FIRST_BIT
This is used to decide whether the data is stored in fixed-length part or variable-length
part. see MAX_FIX_PART_DATA_SIZE
for more information.
public static final long HIGHEST_SECOND_TO_EIGHTH_BIT
This is used to get the length of the data which is stored in this long. see MAX_FIX_PART_DATA_SIZE
for more information.
protected transient MemorySegment[] segments
protected transient int offset
protected transient int sizeInBytes
public BinarySection()
public BinarySection(MemorySegment[] segments, int offset, int sizeInBytes)
public final void pointTo(MemorySegment segment, int offset, int sizeInBytes)
public void pointTo(MemorySegment[] segments, int offset, int sizeInBytes)
public MemorySegment[] getSegments()
public int getOffset()
public int getSizeInBytes()
public byte[] toBytes()
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.