Support Questions
Find answers, ask questions, and share your expertise

Encountered Warning IMPLICIT_CAST_TO_CHARARRAY 5 time(s)

Encountered Warning IMPLICIT_CAST_TO_CHARARRAY 5 time(s)

 
1 REPLY 1

Re: Encountered Warning IMPLICIT_CAST_TO_CHARARRAY 5 time(s)

Hi Gayathri

Default data type in Pig is byteArray. That means if you do not mention any data type for a column, it will by default assign byteArray data type to it.

So, when you said

raw_nmon_DS = LOAD '$input' using PigStorage(','); 

every column in your schema is byteArray by default.

So whenever you perform any operation on your columns, they are first casted to appropriate data types from byteArray. Refer Pig Documentation to learn more about casting.

For starters, you can start with assigning data types to your columns when reading the file. Something like below.

raw_nmon_DS = LOAD '/user/edureka_268377/data/sample.txt' using PigStorage(',') as (col1:chararray,col2:chararray,col3:chararray,............,coln:chararray);

Hope that helps!