[ https://issues.apache.org/jira/browse/PIG-2151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dmitriy V. Ryaboy updated PIG-2151: ----------------------------------- Attachment: PIG-2151.patch The attached patch is much more elegant than what I initially proposed -- it simply makes the default implementation of EvalFunc look at the @OutputSchema annotation. > Add annotation to specify output schema in Java UDFs > ---------------------------------------------------- > > Key: PIG-2151 > URL: https://issues.apache.org/jira/browse/PIG-2151 > Project: Pig > Issue Type: Improvement > Reporter: Dmitriy V. Ryaboy > Attachments: PIG-2151.patch > > > In Python udfs, the output schema of an eval func is specified via an > @OutputSchema annotation. > We should do the same for Java udfs instead of making people write the > cumbersome outputSchema functions. > If an annotation exists, it should override an existing outputSchema > implementation (since all evalFuncs will inherit the method from > EvalFunc.java and there is thus no way to *not* have an implementation). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira