Package org.apache.druid.frame.key
Class RowKey
java.lang.Object
org.apache.druid.frame.key.RowKey
Represents a specific sorting or hashing key. Instances of this class wrap a byte array in row-based frame format.
Following is the layout of the RowKey with n fields
Header section
byte[1..4] - End of field 1
byte[5..8] - End of field 2
...
byte[4(n-1)..4n] - End of field n
Key section
byte[headerEnd+1..headerEnd+1+fieldSize1] - Data of field1
-
Method Details
-
wrap
Create a key from a byte array. The array will be owned by the resulting key object. -
empty
-
array
public byte[] array()Get the backing array for this key (not a copy). -
longHashCode
public long longHashCode() -
equals
-
hashCode
public int hashCode() -
toString
-
estimatedObjectSizeBytes
public int estimatedObjectSizeBytes()Estimate number of bytes taken by the key array. Only returns an estimate and does not account for platform or JVM specific implementation.
-