因为Hive的版本问题,group_concat()函数无法使用,所以使用concat_ws()来替代,并且保留了排序的功能。
-
select a, b concat_ws("分隔字符", collect_list(str_c) over(partition by a, b order by d)) e from table_A;

因为Hive的版本问题,group_concat()函数无法使用,所以使用concat_ws()来替代,并且保留了排序的功能。
select a, b concat_ws("分隔字符", collect_list(str_c) over(partition by a, b order by d)) e from table_A;