答案 0 :(得分:0)
我想通了,可以通过hive查询编辑器编辑类型,使用简单的SQL语句,如:
ALTER TABLE person CHANGE orders order ARRAY<STRUCT<status:string,creation_date:string,orderlines:array<STRUCT<depature_date:string,return_date : string, travel_days : int, creation_date: string,
price : int, booking_class : string, airline_code : string,
psg_gender : string, psg_lastname : string, psg_firstname : string, psg_dob : string>>>>
答案 1 :(得分:0)
我知道了,你可以做到的。
step1:
create table testing.lz_test_struct
(
mark struct<math:string,english:string>
)
row format delimited
fields terminated by ','
collection items terminated by '-';
step2:
hive> desc testing.lz_test_struct;
OK
mark struct<math:string,english:string,address:string,name:string>
step3:
hive> alter table testing.lz_test_struct change mark mark struct<math:string,english:string,address:string,name:string,city:string>;
ok
Time taken: 0.467 seconds
第4步:
hive> desc testing.lz_test_struct;
OK
mark struct<math:string,english:string,address:string,name:string,city:string>
Time taken: 0.143 seconds, Fetched: 1 row(s)