Package org.apache.druid.frame.key
Class RowKeyReader
java.lang.Object
org.apache.druid.frame.key.RowKeyReader
Embeds the logic to read
RowKey from a particular signature of row-based frame.
Stateless and immutable.-
Method Summary
Modifier and TypeMethodDescriptionstatic RowKeyReadercreate(RowSignature signature, FrameType frameType) Creates a newRowKeyReader.static intfieldEndPosition(byte[] keyBytes, int fieldNumber) booleanhasMultipleValues(RowKey key, int fieldNumber) Determine if a particular field of a particular key has multiple values.Read all values out of a key, as a list of objects.Read a value out of a key.Trim a key to a particular fieldCount.trimmedKeyReader(int trimmedFieldCount) Trims the key reader to a particular fieldCount.
-
Method Details
-
create
Creates a newRowKeyReader. -
read
Read a value out of a key. This operation is potentially costly and should not be done for every row. Implementations need not be optimized, and may do more work than strictly necessary in order to keep implementation simple. -
read
Read all values out of a key, as a list of objects. This operation is potentially costly and should not be done for every row. Implementations need not be optimized, and may do more work than strictly necessary in order to keep implementation simple. -
hasMultipleValues
Determine if a particular field of a particular key has multiple values. Faster than callingread(RowKey, int). -
trimmedKeyReader
Trims the key reader to a particular fieldCount. Used to read keys trimmed bytrim(RowKey, int). -
trim
Trim a key to a particular fieldCount. The returned key may be a copy, but is not guaranteed to be. -
fieldEndPosition
public static int fieldEndPosition(byte[] keyBytes, int fieldNumber)
-