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.keyinstances. 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 intcompare(byte[] keyArray1, byte[] keyArray2)static intcomputeFirstFieldPosition(int fieldCount)Compute the offset into each key where the first field starts.static ByteRowKeyComparatorcreate(List<KeyColumn> keyColumns, RowSignature rowSignature)booleanequals(Object o)inthashCode()StringtoString()-
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 soFrameComparisonWidgetImplcan use it.
-
compare
public int compare(byte[] keyArray1, byte[] keyArray2)- Specified by:
comparein interfaceComparator<byte[]>
-
equals
public boolean equals(Object o)
- Specified by:
equalsin interfaceComparator<byte[]>- Overrides:
equalsin classObject
-
-