Package org.apache.druid.frame.key
Class ByteRowKeyComparator
java.lang.Object
org.apache.druid.frame.key.ByteRowKeyComparator
- All Implemented Interfaces:
Comparator<byte[]>
Comparator for byte arrays from
RowKey.key instances.
Comparison logic in this class is very similar to FrameComparisonWidget, but is different because it works
on byte[] instead of Frames.-
Method Summary
Modifier and TypeMethodDescriptionintcompare(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) booleaninthashCode()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Method Details
-
create
-
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
- Specified by:
equalsin interfaceComparator<byte[]>- Overrides:
equalsin classObject
-
hashCode
public int hashCode() -
toString
-