[ https://issues.apache.org/jira/browse/PIG-851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12720234#action_12720234 ]
Hadoop QA commented on PIG-851: ------------------------------- -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12410810/Pig_815_patch.txt against trunk revision 784333. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 7 new or modified tests. -1 javadoc. The javadoc tool appears to have generated 1 warning messages. -1 javac. The applied patch generated 227 javac compiler warnings (more than the trunk's current 224 warnings). +1 findbugs. The patch does not introduce any new Findbugs warnings. -1 release audit. The applied patch generated 162 release audit warnings (more than the trunk's current 160 warnings). -1 core tests. The patch failed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Pig-Patch-minerva.apache.org/85/testReport/ Release audit warnings: http://hudson.zones.apache.org/hudson/job/Pig-Patch-minerva.apache.org/85/artifact/trunk/patchprocess/releaseAuditDiffWarnings.txt Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Pig-Patch-minerva.apache.org/85/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: http://hudson.zones.apache.org/hudson/job/Pig-Patch-minerva.apache.org/85/console This message is automatically generated. > Map type used as return type in UDFs not recognized at all times > ---------------------------------------------------------------- > > Key: PIG-851 > URL: https://issues.apache.org/jira/browse/PIG-851 > Project: Pig > Issue Type: Bug > Components: impl > Affects Versions: 0.3.0 > Reporter: Santhosh Srinivasan > Fix For: 0.3.0 > > Attachments: Pig_815_patch.txt > > > When an UDF returns a map and the outputSchema method is not overridden, Pig > does not figure out the data type. As a result, the type is set to unknown > resulting in run time failure. An example script and UDF follow > {code} > public class mapUDF extends EvalFunc<Map<Object, Object>> { > @Override > public Map<Object, Object> exec(Tuple input) throws IOException { > return new HashMap<Object, Object>(); > } > //Note that the outputSchema method is commented out > /* > @Override > public Schema outputSchema(Schema input) { > try { > return new Schema(new Schema.FieldSchema(null, null, > DataType.MAP)); > } catch (FrontendException e) { > return null; > } > } > */ > {code} > {code} > grunt> a = load 'student_tab.data'; > grunt> b = foreach a generate EXPLODE(1); > grunt> describe b; > b: {Unknown} > grunt> dump b; > 2009-06-15 17:59:01,776 [main] INFO > org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher > - Failed! > 2009-06-15 17:59:01,781 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR > 2080: Foreach currently does not handle type Unknown > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.