[ https://issues.apache.org/jira/browse/PIG-1978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Dai updated PIG-1978: ---------------------------- Attachment: PIG-1978-1.patch > Secondary sort fail when dereferencing two fields inside foreach > ---------------------------------------------------------------- > > Key: PIG-1978 > URL: https://issues.apache.org/jira/browse/PIG-1978 > Project: Pig > Issue Type: Bug > Components: impl > Affects Versions: 0.9.0 > Reporter: Daniel Dai > Assignee: Daniel Dai > Fix For: 0.9.0 > > Attachments: PIG-1978-1.patch > > > The following script fail: > {code} > a = load '1.txt' as (a0, a1, a2); > b = group a by (a0, a1); > c = foreach b { > c1 = a.(a1,a2); > generate group, c1; > } > explain c; > {code} > Error message: > Caused by: org.apache.pig.impl.logicalLayer.FrontendException: ERROR 0: > POForEach has more than 1 input plans > at > org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.SecondaryKeyOptimizer$SecondaryKeyDiscover.processForEach(SecondaryKeyOptimizer.java:551) > at > org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.SecondaryKeyOptimizer$SecondaryKeyDiscover.processRoot(SecondaryKeyOptimizer.java:485) > at > org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.SecondaryKeyOptimizer$SecondaryKeyDiscover.process(SecondaryKeyOptimizer.java:470) > at > org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.SecondaryKeyOptimizer.visitMROp(SecondaryKeyOptimizer.java:254) > Thanks William reporting. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira