[ 
https://issues.apache.org/jira/browse/PIG-421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12629325#action_12629325
 ] 

Santhosh Srinivasan commented on PIG-421:
-----------------------------------------

With Pig-398, the issue with LOVisitor not walking all inner plans correctly 
was resolved. That has uncovered other issues. One of which is the following:

During type checking, schemas are computed for a collection of operators. 
Later, the optimizer, resets the schemas and calls the getSchema() method on 
the operators. Instead of returning the schemas computed by the type checker 
(which are now lost), the schemas computed by the individual operator are 
returned. In order to resolve this, we need to move the schema computation out 
of the type checker and into a common place (getSchema() method of the 
operators).

The query in the bug report generates the following stack trace:

{code}
384826 [main] ERROR org.apache.pig.tools.grunt.GruntParser  - 
java.io.IOException: Unable to explain alias d [Can't overwrite cause]
        at java.lang.Throwable.initCause(Throwable.java:320)
        at 
org.apache.pig.impl.logicalLayer.validators.TypeCheckingVisitor.resolveLOProjectType(TypeCheckingVisitor.java:212)
        at 
org.apache.pig.impl.logicalLayer.validators.TypeCheckingVisitor.checkInnerPlan(TypeCheckingVisitor.java:2298)
        at 
org.apache.pig.impl.logicalLayer.validators.TypeCheckingVisitor.visit(TypeCheckingVisitor.java:1848)
        at org.apache.pig.impl.logicalLayer.LOFilter.visit(LOFilter.java:102)
{code}

> error with complex nested plan
> ------------------------------
>
>                 Key: PIG-421
>                 URL: https://issues.apache.org/jira/browse/PIG-421
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: types_branch
>            Reporter: Olga Natkovich
>            Assignee: Santhosh Srinivasan
>             Fix For: types_branch
>
>
> Even after applying patch for PIG-398, the following query still fails:
> a = load 'studenttab10k' as (name, age, gpa);
> b = filter a by age < 20;
> c = group b by age;
> d = foreach c {
>     cf = filter b by gpa < 3.0;
>     cp = cf.gpa;
>         cd = distinct cp;
>     co = order cd by $0;
>     generate group, flatten(co);
>     }
> store d into 'output';

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