hive: cast array<struct<key:string,value:array<string>>> into map<string,array<string>>
问题 I have a hive table like name string address string timezone string one_key_value array<struct<key:string,value:array<string>> two_key_value array<struct<key:string,value:array<string>> and want to convert it to name string address string timezone string one_key_value map<string,array<string>> two_key_value map<string,array<string>> There is explode(array) but doesn't really return the entire table in the format I want. 回答1: Use lateral view with inline and map the resulting keys and values.