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

Santhosh Srinivasan updated PIG-310:
------------------------------------

    Attachment: sort_with_nested_project.patch

The patch fixes the following issue:

1. In LOSort's nested plans, the projections will not be connected to their 
inputs. Earlier, due to the connection, the same operator was playing dual 
roles: 
   i. Sort's input
   ii. The sort column's input

Unit test cases that still fail are:

 [junit] Running org.apache.pig.test.TestEvalPipeline
[junit] Tests run: 8, Failures: 0, Errors: 1, Time elapsed: 179.904 sec
[junit] Test org.apache.pig.test.TestEvalPipeline FAILED

[junit] Running org.apache.pig.test.TestFilterOpNumeric
[junit] Tests run: 8, Failures: 0, Errors: 1, Time elapsed: 56.124 sec
[junit] Test org.apache.pig.test.TestFilterOpNumeric FAILED

[junit] Running org.apache.pig.test.TestBuiltin
[junit] Tests run: 23, Failures: 1, Errors: 1, Time elapsed: 14.8 sec
[junit] Test org.apache.pig.test.TestBuiltin FAILED

[junit] Running org.apache.pig.test.TestStoreOld
[junit] Tests run: 3, Failures: 0, Errors: 2, Time elapsed: 21.453 sec
[junit] Test org.apache.pig.test.TestStoreOld FAILED

> Some nested order by queries fail in logical to physical translator
> -------------------------------------------------------------------
>
>                 Key: PIG-310
>                 URL: https://issues.apache.org/jira/browse/PIG-310
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: types_branch
>            Reporter: Alan Gates
>            Assignee: Santhosh Srinivasan
>            Priority: Critical
>             Fix For: types_branch
>
>         Attachments: sort_with_nested_project.patch
>
>
> The query:
> {code}
> a = load 'myfile';                                                            
>                                 
> b = group a by $0;                                                            
>                                                                               
>     
> c = foreach b {c1 = order $1 by $1; generate flatten(c1); };                  
>                                                                               
>     
> store c into 'outfile'
> {code}
> dies with the error message:
> java.io.IOException: Unable to store for alias: c [null]
>     at 
> org.apache.pig.backend.hadoop.executionengine.HExecutionEngine.compile(HExecutionEngine.java:232)
>     at org.apache.pig.PigServer.compilePp(PigServer.java:556)
>     at org.apache.pig.PigServer.execute(PigServer.java:482)
>     at org.apache.pig.PigServer.store(PigServer.java:324)
>     at org.apache.pig.PigServer.store(PigServer.java:310)
>     at 
> org.apache.pig.tools.grunt.GruntParser.processStore(GruntParser.java:173)
>     at 
> org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:317)
>     at 
> org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:77)
>     at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:58)
>     at org.apache.pig.Main.main(Main.java:311)
> Caused by: org.apache.pig.backend.executionengine.ExecException
>     ... 10 more
> Caused by: org.apache.pig.impl.plan.VisitorException
>     at 
> org.apache.pig.impl.logicalLayer.LogToPhyTranslationVisitor.visit(LogToPhyTranslationVisitor.java:726)
>     at org.apache.pig.impl.logicalLayer.LOSort.visit(LOSort.java:141)
>     at org.apache.pig.impl.logicalLayer.LOSort.visit(LOSort.java:35)
>     at 
> org.apache.pig.impl.plan.DependencyOrderWalkerWOSeenChk.walk(DependencyOrderWalkerWOSeenChk.java:68)
>     at 
> org.apache.pig.impl.logicalLayer.LogToPhyTranslationVisitor.visit(LogToPhyTranslationVisitor.java:651)
>     at org.apache.pig.impl.logicalLayer.LOForEach.visit(LOForEach.java:87)
>     at org.apache.pig.impl.logicalLayer.LOForEach.visit(LOForEach.java:36)
>     at 
> org.apache.pig.impl.plan.DependencyOrderWalker.walk(DependencyOrderWalker.java:68)
>     at org.apache.pig.impl.plan.PlanVisitor.visit(PlanVisitor.java:51)
>     at 
> org.apache.pig.backend.hadoop.executionengine.HExecutionEngine.compile(HExecutionEngine.java:229)
>     ... 9 more
> Caused by: org.apache.pig.impl.plan.PlanException: Attempt to connect 
> operator Project[tuple][1] - gates-Sat Jul 12 17:57:09 PDT 2008-16 which is 
> not in the pla
>     at 
> org.apache.pig.impl.plan.OperatorPlan.checkInPlan(OperatorPlan.java:254)
>     at org.apache.pig.impl.plan.OperatorPlan.connect(OperatorPlan.java:140)
>     at 
> org.apache.pig.impl.physicalLayer.plans.PhysicalPlan.connect(PhysicalPlan.java:77)
>     at 
> org.apache.pig.impl.logicalLayer.LogToPhyTranslationVisitor.visit(LogToPhyTranslationVisitor.java:723)
>     ... 18 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to