[ 
https://issues.apache.org/jira/browse/PIG-2184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Dai updated PIG-2184:
----------------------------

      Resolution: Fixed
    Hadoop Flags: Reviewed
          Status: Resolved  (was: Patch Available)

Unit test pass. test-patch:

     [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 3 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 964 javac compiler 
warnings (more than the trunk's current 962 warnings).
     [exec] 
     [exec]     +1 findbugs.  The patch does not introduce any new Findbugs 
warnings.
     [exec] 
     [exec]     -1 release audit.  The applied patch generated 475 release 
audit warnings (more than the trunk's current 468 warnings).

javac warning is in generated file. No new file added so ignore release audit 
warning.

Patch committed to trunk and 0.10 branch.

Thanks Xuting!
                
> Not able to provide positional reference to macro invocations
> -------------------------------------------------------------
>
>                 Key: PIG-2184
>                 URL: https://issues.apache.org/jira/browse/PIG-2184
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Vivek Padmanabhan
>            Assignee: xuting zhao
>             Fix For: 0.10
>
>         Attachments: 2184.patch
>
>
> It looks like the macro functionality doesnt support for positional 
> references. The below is an example script;
> ----------------------------------------------------------------------------
> DEFINE my_macro (X,key) returns Y
>         {
>         tmp1 = foreach  $X generate TOKENIZE((chararray)$key) as tokens;
>         tmp2 = foreach tmp1 generate flatten(tokens);
>         tmp3 = order tmp2 by $0;
>         $Y = distinct tmp3;
>         }
> A = load 'sometext' using TextLoader() as (row1) ;
> E = my_macro(A,A.$0);
> dump E;
> ----------------------------------------------------------------------------
> This script execution fails at parsing staging itself;
> org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1000: Error during 
> parsing. <file try1.pig, line 16,
> column 16>  mismatched input '.' expecting RIGHT_PAREN
> If i replace A.$0 with the field name ie row1 the script runs fine.

--
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

        

Reply via email to