Enum FieldSpec.DataType

    • Method Detail

      • values

        public static FieldSpec.DataType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared.
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static FieldSpec.DataType valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getStoredType

        public FieldSpec.DataType getStoredType()
        Returns the data type stored in Pinot.

        Pinot internally stores data (physical) in INT, LONG, FLOAT, DOUBLE, STRING, BYTES type, other data types (logical) will be stored as one of these types.

        Stored type should be used when reading the physical stored values from Dictionary, Forward Index etc.

      • isFixedWidth

        public boolean isFixedWidth()
        Returns true if the data type is of fixed width (INT, LONG, FLOAT, DOUBLE, BOOLEAN, TIMESTAMP), false otherwise.
      • size

        public int size()
        Returns the number of bytes needed to store the data type.
      • isNumeric

        public boolean isNumeric()
        Returns true if the data type is numeric (INT, LONG, FLOAT, DOUBLE, BIG_DECIMAL), false otherwise.
      • convert

        public Object convert​(String value)
        Converts the given string value to the data type. Returns byte[] for BYTES.
      • convertInternal

        public Comparable convertInternal​(String value)
        Converts the given string value to the data type. Returns ByteArray for BYTES.
      • canBeASortedColumn

        public boolean canBeASortedColumn()
        Checks whether the data type can be a sorted column.