This is PIG-3596. Pig needs to know how to cast bytearray to int. This
logic is built inside loader (LoadFunc.getLoadCaster). However, the
lineage information get lost after UDF. The best practice is produce the
exact schema for the EvalFunc (override outputSchema). For Over UDF, it is
through UDF construct, so use a declare statement statement to pass the
right input schema:
DEFINE IOver org.apache.pig.piggybank.evaluation.Over('f:float');
Thanks,
Daniel
On 11/4/15, 2:01 PM, "ujwal sapkota" <[email protected]> wrote:
>Hello developers,
>
>Pig documentation says it is possible to convert bytearry to int, but I
>keep on getting this error when I try to convert bytearray to
>int/long/chararray. I am usign Over(..row_number..) in pig which generates
>row number without schema. So when the schema is Null, pig reads it as
>bytearray, and unfortunately it cannot be converted to any otherr data
>types. Does anyone know what is wrong here? or is this a bug? I am using
>version 0.12.0
>
>Thank You
>Ujwal