Interface BinaryFormat
-
- All Known Implementing Classes:
BinaryArrayData,BinaryMapData,BinaryRawValueData,BinaryRowData,BinarySection,BinaryStringData,LazyBinaryFormat,NestedRowData
@Internal public interface BinaryFormatBinary format spanningMemorySegments.
-
-
Field Summary
Fields Modifier and Type Field Description static longHIGHEST_FIRST_BITTo get the mark in highest bit of long.static longHIGHEST_SECOND_TO_EIGHTH_BITTo get the 7 bits length in second bit to eighth bit out of a long.static intMAX_FIX_PART_DATA_SIZEIt decides whether to put data in FixLenPart or VarLenPart.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetOffset()Gets the start offset of this binary data in theMemorySegments.org.apache.flink.core.memory.MemorySegment[]getSegments()Gets the underlyingMemorySegments this binary format spans.intgetSizeInBytes()Gets the size in bytes of this binary data.
-
-
-
Field Detail
-
MAX_FIX_PART_DATA_SIZE
static final int MAX_FIX_PART_DATA_SIZE
It decides whether to put data in FixLenPart or VarLenPart. See more inBinaryRowData.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.
- See Also:
- Constant Field Values
-
HIGHEST_FIRST_BIT
static final long HIGHEST_FIRST_BIT
To get the mark in highest bit of long. Form: 10000000 00000000 ... (8 bytes)This is used to decide whether the data is stored in fixed-length part or variable-length part. see
MAX_FIX_PART_DATA_SIZEfor more information.- See Also:
- Constant Field Values
-
HIGHEST_SECOND_TO_EIGHTH_BIT
static final long HIGHEST_SECOND_TO_EIGHTH_BIT
To get the 7 bits length in second bit to eighth bit out of a long. Form: 01111111 00000000 ... (8 bytes)This is used to get the length of the data which is stored in this long. see
MAX_FIX_PART_DATA_SIZEfor more information.- See Also:
- Constant Field Values
-
-
Method Detail
-
getSegments
org.apache.flink.core.memory.MemorySegment[] getSegments()
Gets the underlyingMemorySegments this binary format spans.
-
getOffset
int getOffset()
Gets the start offset of this binary data in theMemorySegments.
-
getSizeInBytes
int getSizeInBytes()
Gets the size in bytes of this binary data.
-
-