Data types
Hive supports all the primitive numeric data types such as TINYINT
, SMALLINT
, INT
, BIGINT
, FLOAT
, DOUBLE
, and DECIMAL
. In addition to these primitive data types, Hive also supports string types such as CHAR
, VARCHAR
, and STRING
data types. Like SQL, the time indicator data types such as TIMESTAMP
and DATE
are present. BOOLEAN
and BINARY
miscellaneous types are available too.
A number of complex types are also available. Complex types can be composed from other primitive or complex types. The complex types available are as follows:
STRUCTS
: These are groupings of data elements similar to a C-struct. The dot notation is used to dereference elements within a struct. A field within column C defined asSTRUCT {x INT, y STRING}
can be accessed ...
Get Hadoop: Data Processing and Modelling now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.