Hive Tutorial 4 : Hive Data types

Numeric Types
·         TINYINT (1-byte signed integer, from -128 to 127)
·         SMALLINT (2-byte signed integer, from -32,768 to 32,767)
·         INT (4-byte signed integer, from -2,147,483,648 to 2,147,483,647)
·         BIGINT (8-byte signed integer, from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807)
·         FLOAT(4-byte single precision floating point number)
·         DOUBLE (8-byte double precision floating point number)
·         DECIMAL
·         Introduced in Hive 0.11.0 with a precision of 38 digits
·         Hive 0.13 introduced user definable precision and scale
Date/Time Types
·         TIMESTAMP (Note: Only available starting with Hive 0.80)
·         DATE (Note: Only available starting with Hive 0.12)
String Types
·         STRING
·         VARCHAR (Note: Only available starting with Hive 0.12.0)
·         CHAR (Note: Only available starting with Hive 0.13.0)
Misc Types
·         BOOLEAN
·         BINARY (Note: Only available starting with Hive 0.8)
Complex Types
Complex Types can be built up from primitive types and other composite types using:
·         arrays: ARRAY<data_type> (Note: negative values and non-constant expressions are allowed as of Hive 0.14.)
·         maps: MAP<primitive_type, data_type> (Note: negative values and non-constant expressions are allowed as of Hive 0.14.)
·         structs: STRUCT<col_name : data_type [COMMENT col_comment], ...>
·         union: UNIONTYPE<data_type, data_type, ...> (Note: Only available starting with Hive 0.7)

Comments

Popular posts from this blog

Hive Tutorial 31 : Analytic Functions

Hive Tutorial 37 : Performance Tuning