Enum DruidType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<DruidType>

    public enum DruidType
    extends java.lang.Enum<DruidType>
    Druid type.
    • 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 query
      protected static DruidType getTypeFromMetric​(java.lang.String type)
      Returns a DruidType matching the given String type from a Druid metric
      boolean isComplex()
      Returns true if and only if this enum should be used inside of a ComplexMetric
      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.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • 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 name
        java.lang.NullPointerException - if the argument is null
      • isComplex

        public boolean isComplex()
        Returns true if and only if this enum should be used inside of a ComplexMetric
      • 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