Enum ValueType
- All Implemented Interfaces:
Serializable
,Comparable<ValueType>
Represents the primitive types supported to read and write data
from value vectors. Vectors support many data widths. For simplicity
(and because of no difference in performance), the get/set methods
use a reduced set of types. In general, each reader and writer
supports just one type. Though some may provide more than one
(such as access to bytes for a STRING value.)
-
Enum Constant Summary
Enum ConstantDescriptionThe value is set from a boolean: BIT.The value is set from a byte buffer.The value is set from a Joda LocalDate.The value is set from a BigDecimal: any of Drill's decimal types.Type is set from a double: FLOAT4 and FLOAT8.Type is set from a float: FLOAT4.The value is set from an integer: TINYINT, SMALLINT, INT, UINT1, and UINT2.The value set from a long: BIGINT and UINT4.The value has no type.The value is set from a Period.The value can be set from a string (for convenience).The value is set from a Joda LocalTime.The value is set from a Joda Instant. -
Method Summary
-
Enum Constant Details
-
BOOLEAN
The value is set from a boolean: BIT. -
INTEGER
The value is set from an integer: TINYINT, SMALLINT, INT, UINT1, and UINT2. -
LONG
The value set from a long: BIGINT and UINT4. -
FLOAT
Type is set from a float: FLOAT4. -
DOUBLE
Type is set from a double: FLOAT4 and FLOAT8. -
STRING
The value can be set from a string (for convenience). VARCHAR and VAR16CHAR. -
BYTES
The value is set from a byte buffer. VARCHAR (in production code), VAR16CHAR, VARBINARY. -
DECIMAL
The value is set from a BigDecimal: any of Drill's decimal types. -
PERIOD
The value is set from a Period. Any of Drill's date/time types. (Note: there is a known bug in which Drill incorrectly differentiates between local date/times (those without a timezone) and absolute date/times (those with a timezone.) Caveat emptor. -
DATE
The value is set from a Joda LocalDate. (Should upgrade to Java 8 LocalDate.) Native type is an int. -
TIME
The value is set from a Joda LocalTime. (Should upgrade to Java 8 LocalTime.) Native type is an int. -
TIMESTAMP
The value is set from a Joda Instant. (Should upgrade to Java 8 Instant.) Native type is a long. -
NULL
The value has no type. This is typically a dummy writer used for unprojected columns.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-