0
給定一個蜂巢表蜂巢從現有的表
create table movie_1(id int, movie_title string, actor string, gender string)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ';'
vi movies.txt
1;hero;john penn;male
2;hero;maggie mcguirre;female
3;lost;peter jones;male
假設一個新表具有複雜類型的新表movie_2
但STRUCT
類型的字段:
create table movie_2(id int, movie_title string, STRUCT <actor:string, gender:string>)
如何創建一個新表movie_2
從現有表movie_1
即從movies_1
中選擇插入新表movies_2?