COLLECT_SET() in Hive, keep duplicates?

后端 未结 9 1529
离开以前
离开以前 2020-12-12 17:06

Is there a way to keep the duplicates in a collected set in Hive, or simulate the sort of aggregate collection that Hive provides using some other method? I want to aggregat

9条回答
  •  佛祖请我去吃肉
    2020-12-12 17:50

    Here is the exact hive query that does this job (works only in hive > 0.13):

    SELECT hash_id, collect_set( num_of_cats) FROM GROUP BY hash_id;

提交回复
热议问题