首页 > 技术文章 > [Hive_add_2] Hive 数据类型

share23 2018-12-22 15:55 原文


 

Hive 数据类型

  正常数据类型

# 整型,4个字节
int

# 大整型,8个字节
bigint

# 字符串,最大长度2G
String

 

  复杂数据类型

# 数组,相同类型元素的数组 array<String>
array => ['tom','jerry']

# 结构体,事先定义好字段名称 struct<column int, fruit string>
struct => {1,'apple'}

# K-V对的集合,事先定义好k-v类型 map<int,string>
map => {1:'apple'}

# 联合类型,此例子是 map 和 array 的嵌套
unoin => {'jack':['tom','jerry']}

 

 

 


 

 

推荐阅读