1.数字类型
类型 | 描述 |
---|---|
TINYINT | (1-byte signed integer, from -128 to 127) |
SMALLINT | (2-byte signed integer, from -32,768 to 32,767) |
INT/INTEGER | (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) |
例子:
create table t_test(a string ,b int,c bigint,d float,e double,f tinyint,g smallint)
2.日期和时间类型
类型 | 描述 |
---|---|
TIMESTAMP | (Note: Only available starting with Hive 0.8.0) |
DATE | (Note: Only available starting with Hive 0.12.0) |
例子
reate table t_customer(id int,name string,birthday date)
3.字符串类型
类型 | 描述 |
---|---|
STRING | |
VARCHAR | (Note: Only available starting with Hive 0.12.0) |
CHAR | (Note: Only available starting with Hive 0.13.0) |
4.其他类型
类型 | 描述 |
---|---|
BOOLEAN | |
BINARY | (Note: Only available starting with Hive 0.8.0) |