1
votes

I am new to the concept of PIG . Now i have file mounted on HDFS . While i am loading the file using

A = LOAD 'user/vishal/output/part-00000' USING PigStorage(' ') as (name,occourence)

it is happening propery but while i am using FILTER command like

FLT = FILTER A by occourence > '20' and occourence < '35';

it is giving the following error

2013-02-27 11:06:16,264 [main] WARN org.apache.pig.PigServer - Encountered Warning IMPLICIT_CAST_TO_CHARARRAY 6 time(s)

What could be the issue

Thanks

1

1 Answers

1
votes

Default datatype for a column in pig is bytearray.

occurence should be int datatype like below .

A = LOAD 'user/vishal/output/part-00000' USING PigStorage(' ') as (name:chararray,occourence:int);

Now you can filter like below (without quotes).

FLT = FILTER A by occourence > 20 and occourence < 35;