here are our result of multi-distinct: hive> describe classes; OK name string number string class string Time taken: 0.122 seconds hive> select * from classes; OK 1 11 8 2 22 12 4 212 2 5 232 23 6 22 2 7 22 2 3 333 13 3 33 3 4 133 32 5 33 3 Time taken: 0.154 seconds
hive> select count(distinct name), count(distinct number), class from classes group by class; .... 1 1 12 1 1 13 3 2 2 1 1 23 2 1 3 1 1 32 1 1 8 2010/2/25 Mafish Liu <[email protected]>: > Hive does not support multi-distinct in one query. > > We have implemented multi-distinct based on hive 0.4.2rc to our demand. > We don't know that if Hive is intresting in this feature. > > 2010/2/25 Jeff Zhang <[email protected]>: >> >> Hi all, >> >> I read the tutorial of Hive, and it says that "no two aggregations can have >> different DISTINCT columns". Could anyone tell what is the reason ? Does the >> following Distinct will been translate to map-reduce job or just do it >> locally ? >> >> INSERT OVERWRITE TABLE pv_gender_agg >> SELECT pv_users.gender, count(DISTINCT pv_users.userid), count(DISTINCT >> pv_users.ip) >> FROM pv_users >> GROUP BY pv_users.gender; >> >> -- >> Best Regards >> >> Jeff Zhang >> > > > > -- > [email protected] > -- [email protected]
