0
我想將零存儲在Hbase的一列中。所以,我在豬腳本中做了以下操作。零的創建問題的總和
data = load 'access_log_Jul95' using PigStorage(' ') as (ip:chararray, dash1:chararray, dash2:chararray, date:chararray, date1:chararray, getRequset:chararray, location:chararray, http:chararray, code:int, size:int);
splitDate = foreach data generate 0 AS size:int , ip as ip, FLATTEN(STRSPLIT(date, ':')) as h;
groupedIp = group splitDate by h.$1;
,然後我正在做這樣的
a = foreach groupedIp generate SUM(splitDate.size);
其拋出錯誤控制檯上像
Could not infer the matching function for org.apache.pig.builtin.SUM as multiple or none of them fit. Please use an explicit cast
有什麼辦法,我總能在這種情況下,用了寫零使用SUM或者SUM在這裏使用全零的方式將會很有幫助。
謝謝。
給您藏漢樣本數據......這將是hepful如果數據可用 – Aman