Package org.apache.calcite.adapter.druid
Enum DruidType
- java.lang.Object
-
- java.lang.Enum<DruidType>
-
- org.apache.calcite.adapter.druid.DruidType
-
-
Enum Constant Summary
Enum Constants Enum Constant Description COMPLEX
DOUBLE
FLOAT
HYPER_UNIQUE
LONG
STRING
THETA_SKETCH
-
Field Summary
Fields Modifier and Type Field Description SqlTypeName
sqlType
The corresponding SQL type.
-
Constructor Summary
Constructors Modifier Constructor Description private
DruidType(SqlTypeName sqlType)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static DruidType
getTypeFromMetaData(java.lang.String type)
Returns a DruidType matching the String from a meta data queryprotected static DruidType
getTypeFromMetric(java.lang.String type)
Returns a DruidType matching the given String type from a Druid metricboolean
isComplex()
Returns true if and only if this enum should be used inside of aComplexMetric
static DruidType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static DruidType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LONG
public static final DruidType LONG
-
FLOAT
public static final DruidType FLOAT
-
DOUBLE
public static final DruidType DOUBLE
-
STRING
public static final DruidType STRING
-
COMPLEX
public static final DruidType COMPLEX
-
HYPER_UNIQUE
public static final DruidType HYPER_UNIQUE
-
THETA_SKETCH
public static final DruidType THETA_SKETCH
-
-
Field Detail
-
sqlType
public final SqlTypeName sqlType
The corresponding SQL type.
-
-
Constructor Detail
-
DruidType
private DruidType(SqlTypeName sqlType)
-
-
Method Detail
-
values
public static DruidType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DruidType c : DruidType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DruidType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
isComplex
public boolean isComplex()
Returns true if and only if this enum should be used inside of aComplexMetric
-
getTypeFromMetric
protected static DruidType getTypeFromMetric(java.lang.String type)
Returns a DruidType matching the given String type from a Druid metric
-
getTypeFromMetaData
protected static DruidType getTypeFromMetaData(java.lang.String type)
Returns a DruidType matching the String from a meta data query
-
-