Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

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.