配置单元计数不同udaf

chhkpiq4  于 2021-06-25  发布在  Hive
关注(0)|答案(1)|浏览(315)

我在计算 count distinct 没有分组,运行非常慢。所以我想知道这个功能是如何在hive中实现的,有没有 UDAFCountDistinct 为了这个?

2lpgd968

2lpgd9681#

hive1.2.0+为count(distinct)提供自动重写优化。检查此设置:

hive.optimize.distinct.rewrite=true;

相关问题