Package io.trino.plugin.accumulo
Class Types
- java.lang.Object
-
- io.trino.plugin.accumulo.Types
-
public final class Types extends Object
Utility class for Trino Type-related functionality.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TypegetElementType(Type type)Gets the element type of the given array type.static TypegetKeyType(Type type)Gets the key type of the given map type.static TypegetValueType(Type type)Gets the value type of the given map type.static booleanisArrayType(Type type)static booleanisMapType(Type type)
-
-
-
Method Detail
-
isArrayType
public static boolean isArrayType(Type type)
-
isMapType
public static boolean isMapType(Type type)
-
getElementType
public static Type getElementType(Type type)
Gets the element type of the given array type. Does not validate that the given type is an array.- Parameters:
type- An array type- Returns:
- Element type of the array
- Throws:
IndexOutOfBoundsException- If type is not an array- See Also:
isArrayType(io.trino.spi.type.Type)
-
getKeyType
public static Type getKeyType(Type type)
Gets the key type of the given map type. Does not validate that the given type is a map.- Parameters:
type- A map type- Returns:
- Key type of the map
- Throws:
IndexOutOfBoundsException- If type is not a map- See Also:
isMapType(io.trino.spi.type.Type)
-
getValueType
public static Type getValueType(Type type)
Gets the value type of the given map type. Does not validate that the given type is a map.- Parameters:
type- A map type- Returns:
- Value type of the map
- Throws:
IndexOutOfBoundsException- If type is not a map- See Also:
isMapType(io.trino.spi.type.Type)
-
-