Before we can get a patch, run Pig with the flag -Dpig.exec.nosecondarykey=true

Daniel

On 04/07/2011 03:35 PM, Daniel Dai wrote:
This is a real bug. Open https://issues.apache.org/jira/browse/PIG-1978
for it. Thanks.

Daniel

On 04/07/2011 08:32 AM, [email protected] wrote:
I have a relation built by grouping the join (TCRaw) of a pair of basic 
relations (SrcFuid and NewCitationRel):

grunt>   describe TCGroupedByFuid;
TCGroupedByFuid: {
    group: (SrcFuid::citingdocid: int,
            SrcFuid::col:chararray,
            SrcFuid::seq: int),
    TCRaw: {SrcFuid::citingdocid: int,
            SrcFuid::col:chararray,
            SrcFuid::seq: int,
            NewCitationRel::citeddocid: int,
            NewCitationRel::citingdocid: int,
            NewCitationRel::col: chararray,
            NewCitationRel::seq: int,
            NewCitationRel::year: int,
            NewCitationRel::eds: chararray}}

For each tuple in this relation, I’d like to get (TCRaw. 
NewCitationRel::citingdocid, TCRaw. NewCitationRel::col).

AA = foreach TCGroupedByFuid {
          FA = TCRaw.(NewCitationRel::citingdocid, NewCitationRel::col);
          generate group, FA;};

But that results in this error:
     ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2213: Error visiting inner 
plan for ForEach

If I am projecting on just a single column, my result is as expected:

AA = foreach TCGroupedByFuid {
          FA = TCRaw.(NewCitationRel::citingdocid); -- OK with or without parens
          generate group, FA;};

dump AA; -- works fine

What is the syntax I need to refer to a projection on two coordinates inside 
foreach with relations built like this?

Thanks for any suggestions, or pointers to the docs (believe me I did look 
first :)

Will

William F Dowling
Sr Technical Specialist, Software Engineering
Thomson Reuters
0 +1 215 823 3853



Reply via email to