美文网首页
[记录]kylin distinct count踩坑

[记录]kylin distinct count踩坑

作者: _呆瓜_ | 来源:发表于2019-03-28 22:10 被阅读0次

CDH版本: Cloudera Express 6.1.0
Kylin版本: apache-kylin-2.6.1-bin-cdh60

计算distinct count(userId)时不正确, userId为string类型, 跨segment时结果不正确(一个segment内正确), 也采用了全局字典.
解决方案, 在hive中, 先用hash函数, 把userId转换为int, 再用distinct count计算, 得到正确的结果.

相关文章

网友评论

      本文标题:[记录]kylin distinct count踩坑

      本文链接:https://www.haomeiwen.com/subject/ygdhbqtx.html