Class BinaryMapData
- java.lang.Object
-
- org.apache.flink.table.data.binary.BinarySection
-
- org.apache.flink.table.data.binary.BinaryMapData
-
- All Implemented Interfaces:
BinaryFormat
,MapData
@Internal public final class BinaryMapData extends BinarySection implements MapData
[4 byte(keyArray size in bytes)] + [Key BinaryArray] + [Value BinaryArray].BinaryMap
are influenced by Apache Spark UnsafeMapData.
-
-
Field Summary
-
Fields inherited from class org.apache.flink.table.data.binary.BinarySection
offset, segments, sizeInBytes
-
Fields inherited from interface org.apache.flink.table.data.binary.BinaryFormat
HIGHEST_FIRST_BIT, HIGHEST_SECOND_TO_EIGHTH_BIT, MAX_FIX_PART_DATA_SIZE
-
-
Constructor Summary
Constructors Constructor Description BinaryMapData()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BinaryMapData
copy()
BinaryMapData
copy(BinaryMapData reuse)
int
hashCode()
BinaryArrayData
keyArray()
Returns an array view of the keys contained in this map.void
pointTo(org.apache.flink.core.memory.MemorySegment[] segments, int offset, int sizeInBytes)
int
size()
Returns the number of key-value mappings in this map.Map<?,?>
toJavaMap(LogicalType keyType, LogicalType valueType)
BinaryArrayData
valueArray()
Returns an array view of the values contained in this map.static BinaryMapData
valueOf(BinaryArrayData key, BinaryArrayData value)
-
Methods inherited from class org.apache.flink.table.data.binary.BinarySection
equals, getOffset, getSegments, getSizeInBytes, pointTo
-
-
-
-
Method Detail
-
size
public int size()
Description copied from interface:MapData
Returns the number of key-value mappings in this map.
-
pointTo
public void pointTo(org.apache.flink.core.memory.MemorySegment[] segments, int offset, int sizeInBytes)
- Overrides:
pointTo
in classBinarySection
-
keyArray
public BinaryArrayData keyArray()
Description copied from interface:MapData
Returns an array view of the keys contained in this map.A key-value pair has the same index in the key array and value array.
-
valueArray
public BinaryArrayData valueArray()
Description copied from interface:MapData
Returns an array view of the values contained in this map.A key-value pair has the same index in the key array and value array.
- Specified by:
valueArray
in interfaceMapData
-
toJavaMap
public Map<?,?> toJavaMap(LogicalType keyType, LogicalType valueType)
-
copy
public BinaryMapData copy()
-
copy
public BinaryMapData copy(BinaryMapData reuse)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classBinarySection
-
valueOf
public static BinaryMapData valueOf(BinaryArrayData key, BinaryArrayData value)
-
-