问题描述:

grunt> a = load '/user/horton/flightdelays_clean/part-m-00000' using PigStorage(',');

2016-10-12 15:22:25,593 [main] INFO

org.apache.hadoop.conf.Configuration.deprecation - fs.default.name is

deprecated. Instead, use fs.defaultFS

grunt> b = group a by $0;

grunt> c = foreach b generate COUNT($0);

2016-10-12 15:22:40,244 [main] WARN

org.apache.pig.newplan.BaseOperatorPlan - Encountered Warning

USING_OVERLOADED_FUNCTION 1 time(s). 2016-10-12 15:22:40,248 [main]

WARN org.apache.pig.newplan.BaseOperatorPlan - Encountered Warning

IMPLICIT_CAST_TO_BAG 1 time(s).

网友答案:

You are passing a field as an argument to a function that requires some type but the field is another type.
Try this:

grunt> b = group a by $0;
grunt> c = foreach b generate COUNT(a);
网友答案:
c = foreach b generate COUNT($0);

Should be

c = foreach b generate COUNT(a);
相关阅读:
Top