Support Questions

Find answers, ask questions, and share your expertise

How does collect_list() function work in Hive. Can anyone share an detailed example.

avatar
Expert Contributor

From https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF I found the below, but want some more details:

collect_list(col)Returns a list of objects with duplicates
2 REPLIES 2

avatar
Expert Contributor

@Tamil Selvan K, Refer the below link for more details on this function,

https://community.hortonworks.com/questions/10513/hive-original-order-of-records-using-collect-list....

avatar
Expert Contributor
@Satish Sarapuri

Thanks, but when I tried to check its behavior (expecting something like it would return only the duplicate records), but it returned every records in that table. Hence, wanted to know an simple implementation of it.