...
- arrays:
ARRAY<data_type>
- maps:
MAP<primitive_type, data_type>
Wiki Markup structs: {{STRUCT<col_name : data_type \[COMMENT col_comment\], ...>}}
- union:
UNIONTYPE<data_type, data_type, ...>
(Note: Only available starting with Hive 0.7.0)
Column Types
Integral Types (TINYINT
, SMALLINT
, INT
, BIGINT
)
...
Info | ||
---|---|---|
| ||
Decimal datatype was introduced in Hive 0.11.0 (HIVE-2693) and revised in Hive 0.13.0 (HIVE-3976). |
The DECIMAL
type in Hive is based on Java's BigDecimal which is used for representing immutable arbitrary precision decimal numbers in Java. All regular number operations (e.g. +, -, *, /) and relevant UDFs (e.g. Floor, Ceil, Round, and many more) handle decimal types. You can cast to/from decimal types like you would do with other numeric types. The persistence format of the decimal type supports both scientific and non-scientific notation. Therefore, regardless of whether your dataset contains data like 1E+44 (scientific notation) or 4004 (non-scientific notation) or a combination of both, DECIMAL
can be used for it.
...
Union Types
Anchor | ||||
---|---|---|---|---|
|
Info | ||
---|---|---|
| ||
Union datatype was introduced in Hive 0.7.0 (HIVE-537). See HIVE-2390 for planned improvements. |
Union types can at any one point hold exactly one of their specified data types. You can create an instance of this type using the create_union
UDF:
...