当我转储它时,count_bool 受到具有以下输出的单个元组的影响:
(0)
...
(1)
(0)
...
(0)
因此,如果有 100 - (0) 和 20 - (1) 我希望输出为:
(1, 20)
(0, 100)
这是我尝试变平和计数的尝试
count_by_xy = foreach count_by_subject generate flatten($0), COUNT($0);
2013-07-09 00:05:43,590 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1045:
Could not infer the matching function for org.apache.pig.builtin.COUNT as multiple or none of them fit. Please use an explicit cast.
我的问题是什么?