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].BinaryMapare 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 BinaryMapDatacopy()BinaryMapDatacopy(BinaryMapData reuse)inthashCode()BinaryArrayDatakeyArray()Returns an array view of the keys contained in this map.voidpointTo(org.apache.flink.core.memory.MemorySegment[] segments, int offset, int sizeInBytes)intsize()Returns the number of key-value mappings in this map.Map<?,?>toJavaMap(LogicalType keyType, LogicalType valueType)BinaryArrayDatavalueArray()Returns an array view of the values contained in this map.static BinaryMapDatavalueOf(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:MapDataReturns 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:
pointToin classBinarySection
-
keyArray
public BinaryArrayData keyArray()
Description copied from interface:MapDataReturns 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:MapDataReturns 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:
valueArrayin interfaceMapData
-
toJavaMap
public Map<?,?> toJavaMap(LogicalType keyType, LogicalType valueType)
-
copy
public BinaryMapData copy()
-
copy
public BinaryMapData copy(BinaryMapData reuse)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classBinarySection
-
valueOf
public static BinaryMapData valueOf(BinaryArrayData key, BinaryArrayData value)
-
-