Database Reference
In-Depth Information
Table 17-3. Hive data types
Category Type
Description
Literal examples
Primitive
BOOLEAN True/false value.
TRUE
TINYINT 1-byte (8-bit) signed integer, from -128 to 127.
1Y
SMALLINT 2-byte (16-bit) signed integer, from -32,768 to
32,767.
1S
4-byte (32-bit) signed integer, from -2,147,483,648
to 2,147,483,647.
INT
1
8-byte (64-bit) signed integer, from
-9,223,372,036,854,775,808 to
9,223,372,036,854,775,807.
BIGINT
1L
4-byte (32-bit) single-precision floating-point num-
ber.
FLOAT
1.0
8-byte (64-bit) double-precision floating-point num-
ber.
DOUBLE
1.0
DECIMAL Arbitrary-precision signed decimal number.
1.0
Unbounded variable-length character string.
'a' , "a"
STRING
VARCHAR Variable-length character string.
'a' , "a"
Fixed-length character string.
'a' , "a"
CHAR
Byte array.
Not supported
BINARY
TIMESTAMP Timestamp with nanosecond precision.
1325502245000 ,
'2012-01-02
03:04:05.123456789'
Date.
DATE
'2012-01-02'
Search WWH ::




Custom Search