hive 建表 数组,结构体, map


create table test_set(
id INT,
name STRING,
hobby ARRAY,    //array中元素为String类型
friend MAP,    //map中键和值均为String类型
mark structint,english:int>   //Struct中元素为Int类型
)
row format delimited fields terminated by ','   //字段之间用','分隔
collection items terminated by '_'     //集合中的元素用'_'分隔
map keys terminated by ':'      //map中键值对之间用':'分隔
lines terminated by '\n       //行之间用'\n'分隔
 

以上是 在数组中插入结构体  map  以及  key:value 的形式.