Geert Van Landeghem 2013-06-20, 12:55
"Unknown" means Pig doesn't recognize the data type at all. I can imagine
that you wil run into that error only if your UDF returns some data type
that is not supported by the version of Pig that you're running. That's
possible if you compile your UDF with a newer version of Pig that
introduced a new data type, and you use it with an older version of Pig
that doesn't support that data type.
If you use unsupported data type in query, it will be detected at query
compilation time. But since UDFs are registered as bytecode, Pig won't be
able to detect it until runtime.
I would first check whether the same version of Pig is used everywhere form
building UDFs to executing plans. I can't think of anything else.
Hope this helps.
On Thu, Jun 20, 2013 at 5:55 AM, Geert Van Landeghem <[EMAIL PROTECTED]>wrote:
> Hello all,
> we have been hit by org.apache.pig.backend.executionengine.ExecException:
> ERROR 1071: Cannot convert a Unknown to a String
> at org.apache.pig.data.DataType.toString(DataType.java:1105)
> - How can I generate this error? Have been trying with null fields to cast
> them to char arrays etc but don't succeed
> - What is the best approach to find the origin of this exception? We are
> processing a lot of data…is it the data is it the UDFs we have developed?
> kind regards,
> Geert Van Landeghem