[ https://issues.apache.org/jira/browse/DATAFU-45?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13985730#comment-13985730 ]
Sam Steingold edited comment on DATAFU-45 at 4/30/14 4:55 PM: -------------------------------------------------------------- tried that: {code} my_stage2 = foreach my_stage1 { keywords = cross keywords, TOBAG(weight); generate id, keywords; }; describe my_stage2; -- my_stage2: {id: chararray,keywords: {(keywords::token: chararray,null::weight: double)}} dump my_stage2; -- ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1066: Unable to open iterator for alias my_stage2 {code} in fact, I get the exact same error behavior for {{weight}}, {{TOBAG(weight)}}, and {{{weight}}}. was (Author: sds): tried that: {code} my_stage2 = foreach my_stage1 { keywords = cross keywords, TOBAG(weight); generate id, keywords; }; describe my_stage2; -- my_stage2: {id: chararray,keywords: {(keywords::token: chararray,null::weight: double)}} dump my_stage2; -- ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1066: Unable to open iterator for alias my_stage2 {code} > RFE: CartesianProduct > --------------------- > > Key: DATAFU-45 > URL: https://issues.apache.org/jira/browse/DATAFU-45 > Project: DataFu > Issue Type: New Feature > Reporter: Sam Steingold > > Given two bags, produce their [Cartesian > product|http://en.wikipedia.org/wiki/Cartesian_product]: > {code} > B1: bag{T1} > B2: bag{T2} > CartesianProduct(B1,B2): bag{(T1,T2)} > {code} > Use case: > {code} > toks = TOKENIZE((charray)$0,','); > kwds = CartesianProduct(toks, {1.0/(double)SIZE(toks)}); > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)