lateral view 使用方法

这个函数相当于拆开行变成列。 

可以理解为行转列。

               select
                    id,order_label
               from table_bx
               lateral view explode(split(work_order_label, ',')) order_label as order_label

源表:

Array<int> pageid_listArray<string> adid_list
[1, 2, 3] ["a", "b", "c"]
[3, 4] ["c", "d"]

结果为:

原文地址:https://www.cnblogs.com/sakura3/p/12022695.html