[
https://issues.apache.org/jira/browse/PIG-1998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022393#comment-13022393
]
Richard Ding commented on PIG-1998:
-----------------------------------
Patch-test results:
{code}
[exec] -1 overall.
[exec]
[exec] +1 @author. The patch does not contain any @author tags.
[exec]
[exec] +1 tests included. The patch appears to include 5 new or
modified tests.
[exec]
[exec] +1 javadoc. The javadoc tool did not generate any warning
messages.
[exec]
[exec] -1 javac. The applied patch generated 952 javac compiler
warnings (more than the trunk's current 948 warnings).
[exec]
[exec] +1 findbugs. The patch does not introduce any new Findbugs
warnings.
[exec]
[exec] +1 release audit. The applied patch does not increase the
total number of release audit warnings.
{code}
> Allow macro to return void
> --------------------------
>
> Key: PIG-1998
> URL: https://issues.apache.org/jira/browse/PIG-1998
> Project: Pig
> Issue Type: Improvement
> Components: impl
> Affects Versions: 0.9.0
> Reporter: Richard Ding
> Assignee: Richard Ding
> Fix For: 0.9.0
>
> Attachments: PIG-1998_1.patch
>
>
> Pig macro is allowed to not have output alias. But this property isn't clear
> from macro definition and macro invocation (macro inline). Here we propose to
> make it clear:
> 1. If a macro doesn't output any alias, it must specify void as return value.
> For example:
> {code}
> define mymacro(...) returns void {
> ... ...
> };
> {code}
> 2. If a macro doesn't output any alias, it must be invoked without return
> value. For example, to invoke above macro, just specify:
> {code}
> mymacro(...);
> {code}
> 3. Any non-void return alias in the macro definition must exist in the macro
> body and be prefixed with $. For example:
> {code}
> define mymacro(...) returns B {
> ... ...
> $B = filter ...;
> };
> {code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira