hivesql中写法:count(distinct 字段名) over(partition by 字段名) ->根据某些字段分区,去重并统计某个字段的个数
saprksql中写法:size(collect_set(字段名)over(partition by 字段名)) ->意思与hive相同,
因为saprksql中不支持count()over(partition by) 的情况下额外加一个distinct,所以转化为collect_set,这个函数本身自带去重效果,size得出集合大小,侧面得出统计值