How can I convert array to string in hive sql?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to convert an array to string in hive. I want to collect_set array values to convert to string without [[""]] . select actor, collect_set(date) as grpdate from actor_table group by actor; so that [["2016-07-01", "2016-07-02"]] would become 2016-07-01, 2016-07-02 回答1: Use concat_ws(string delimiter, array<string>) function to concatenate array: select actor, concat_ws(',',collect_set(date)) as grpdate from actor_table group by actor; If the date field is not string, then convert it to string: concat_ws(',',collect_set(cast(date as