Affects Version/s: 0.7.0
Fix Version/s: None
Macbook Pro 6.2, Ubuntu 10.04 AMD64, CDH3 beta 3
I'm in the process of writing a suite of UDFs to deal with nested JSON data inside of Pig. In one case, I created a UDF of type EvalFunc<String> and wanted to use it like so:
When I do this, I get the following error:
ERROR 1022: Type mismatch merging schema prefix. Field Schema: chararray. Other Field Schema: count: int
I can work around it by adding another projection with just a cast (as below), but I'd prefer if the form I just first just worked.
I'd prefer not to have to have ExtractInteger extends EvalFun<Integer> if I can avoid it. In our case, it gets even more cumbersome because we want to have something like ExtractStringTuple extends EvalFunc<Tuple> that returns a tuple of strings without parsing the JSON over and over again:
As indicated, I have tested this with Pig 0.7.0. My apologies if this is already fixed in 0.8 since I was not able to test with a newer version.