1. 程式人生 > 其它 >hive count distinct多個欄位

hive count distinct多個欄位

技術標籤:hivehive

解決辦法

set hive.groupby.skewindata=false;

即可查詢

 hive>select count(distinct id, name) from test; 

預設是false
由於大部分時候會設定成true來減少資料傾斜現象.