Class PartitionDataTypeUtils
- java.lang.Object
-
- org.apache.ignite.internal.sql.optimizer.affinity.PartitionDataTypeUtils
-
public class PartitionDataTypeUtils extends Object
Utility methods for partition extractor.
-
-
Field Summary
Fields Modifier and Type Field Description static ObjectCONVERTATION_FAILUREConvertation failure marker.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Objectconvert(Object arg, PartitionParameterType targetType)Convert argument to the given type.static ObjectstringToUUID(String s)Utility method that helps to convert String to UUID.
-
-
-
Field Detail
-
CONVERTATION_FAILURE
public static final Object CONVERTATION_FAILURE
Convertation failure marker.
-
-
Method Detail
-
convert
public static Object convert(Object arg, PartitionParameterType targetType)
Convert argument to the given type.- Parameters:
arg- Argument.targetType- Type.- Returns:
- Converted argument or
CONVERTATION_FAILUREif convertation failed.
-
stringToUUID
public static Object stringToUUID(String s)
Utility method that helps to convert String to UUID. Given method is more fault tolerant than more commonUUID.fromString(). For example it supports String represendation of UUID-without-hyphens conversion, that is not supported by mentioned aboveUUID.fromString().- Parameters:
s- String to- Returns:
- UUID or
CONVERTATION_FAILUREif convertation failed.
-
-