行转列
select col1,col2,**concat_ws**(',',**collect_set**(col3))
from test
group by col1,col2;
列转行
select col1, col2, col5
from test a
**lateral view explode**(split(col3,',')) b as col5
行转列
select col1,col2,**concat_ws**(',',**collect_set**(col3))
from test
group by col1,col2;
列转行
select col1, col2, col5
from test a
**lateral view explode**(split(col3,',')) b as col5