Package org.apache.druid.frame.field
Class TransformUtils
- java.lang.Object
-
- org.apache.druid.frame.field.TransformUtils
-
public class TransformUtils extends Object
Utility methods to map the primitive numeric types into an equi-wide byte representation, such that the given byte sequence preserves the ordering of the original type when done byte comparison. CheckoutFrameReaderUtils.compareMemoryToByteArrayUnsigned(org.apache.datasketches.memory.Memory, long, long, byte[], int, int)for how this byte comparison is performed.
-
-
Constructor Summary
Constructors Constructor Description TransformUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static doubledetransformToDouble(long bits)Inverse oftransformFromDouble(double).static floatdetransformToFloat(int bits)Inverse oftransformFromFloat(float).static longdetransformToLong(long bits)Reverse thetransformFromLong(long)function.static longtransformFromDouble(double n)Transforms a double into a form where it can be compared as unsigned bytes without decoding.static inttransformFromFloat(float n)Transforms a float into a form where it can be compared as unsigned bytes without decoding.static longtransformFromLong(long n)Transforms a long into a form where it can be compared as unsigned bytes without decoding.
-
-
-
Method Detail
-
transformFromDouble
public static long transformFromDouble(double n)
Transforms a double into a form where it can be compared as unsigned bytes without decoding.
-
detransformToDouble
public static double detransformToDouble(long bits)
Inverse oftransformFromDouble(double).
-
transformFromLong
public static long transformFromLong(long n)
Transforms a long into a form where it can be compared as unsigned bytes without decoding.
-
detransformToLong
public static long detransformToLong(long bits)
Reverse thetransformFromLong(long)function.
-
transformFromFloat
public static int transformFromFloat(float n)
Transforms a float into a form where it can be compared as unsigned bytes without decoding.
-
detransformToFloat
public static float detransformToFloat(int bits)
Inverse oftransformFromFloat(float).
-
-