Package org.apache.druid.frame.key
Class ByteRowKeyComparator
- java.lang.Object
-
- org.apache.druid.frame.key.ByteRowKeyComparator
-
- All Implemented Interfaces:
Comparator<byte[]>
public class ByteRowKeyComparator extends Object implements Comparator<byte[]>
Comparator for byte arrays fromRowKey.key
instances. Comparison logic in this class is very similar toFrameComparisonWidget
, but is different because it works on byte[] instead of Frames.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(byte[] keyArray1, byte[] keyArray2)
static int
computeFirstFieldPosition(int fieldCount)
Compute the offset into each key where the first field starts.static ByteRowKeyComparator
create(List<KeyColumn> keyColumns, RowSignature rowSignature)
boolean
equals(Object o)
int
hashCode()
String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
create
public static ByteRowKeyComparator create(List<KeyColumn> keyColumns, RowSignature rowSignature)
-
computeFirstFieldPosition
public static int computeFirstFieldPosition(int fieldCount)
Compute the offset into each key where the first field starts. Public soFrameComparisonWidgetImpl
can use it.
-
compare
public int compare(byte[] keyArray1, byte[] keyArray2)
- Specified by:
compare
in interfaceComparator<byte[]>
-
equals
public boolean equals(Object o)
- Specified by:
equals
in interfaceComparator<byte[]>
- Overrides:
equals
in classObject
-
-