You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Thejas M Nair (JIRA)" <ji...@apache.org> on 2011/03/16 18:51:34 UTC

[jira] Created: (PIG-1910) incorrect schema shown when project-star is used with other projections

incorrect schema shown when project-star is used with other projections
-----------------------------------------------------------------------

                 Key: PIG-1910
                 URL: https://issues.apache.org/jira/browse/PIG-1910
             Project: Pig
          Issue Type: Bug
    Affects Versions: 0.9.0
            Reporter: Thejas M Nair
             Fix For: 0.9.0


{code}
grunt> l = load 'x' ;                                       
grunt> f = foreach l generate $1 as a, *, $2 as b;          
grunt> describe f;
f: {a: bytearray,(null),b: bytearray}  -- The tuple returned by * is automatically flattened, so this schema is not correct. It is more accurate to return a null schema.

{code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIG-1910) incorrect schema shown when project-star is used with other projections

Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Dai updated PIG-1910:
----------------------------

    Attachment: PIG-1910-1.patch

> incorrect schema shown when project-star is used with other projections
> -----------------------------------------------------------------------
>
>                 Key: PIG-1910
>                 URL: https://issues.apache.org/jira/browse/PIG-1910
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Thejas M Nair
>            Assignee: Daniel Dai
>             Fix For: 0.9.0
>
>         Attachments: PIG-1910-1.patch
>
>
> {code}
> grunt> l = load 'x' ;                                       
> grunt> f = foreach l generate $1 as a, *, $2 as b;          
> grunt> describe f;
> f: {a: bytearray,(null),b: bytearray}  -- The tuple returned by * is automatically flattened, so this schema is not correct. It is more accurate to return a null schema.
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIG-1910) incorrect schema shown when project-star is used with other projections

Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Dai updated PIG-1910:
----------------------------

    Attachment: PIG-1910-5.patch

> incorrect schema shown when project-star is used with other projections
> -----------------------------------------------------------------------
>
>                 Key: PIG-1910
>                 URL: https://issues.apache.org/jira/browse/PIG-1910
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Thejas M Nair
>            Assignee: Daniel Dai
>             Fix For: 0.9.0
>
>         Attachments: PIG-1910-1.patch, PIG-1910-2.patch, PIG-1910-3.patch, PIG-1910-4.patch, PIG-1910-5.patch
>
>
> {code}
> grunt> l = load 'x' ;                                       
> grunt> f = foreach l generate $1 as a, *, $2 as b;          
> grunt> describe f;
> f: {a: bytearray,(null),b: bytearray}  -- The tuple returned by * is automatically flattened, so this schema is not correct. It is more accurate to return a null schema.
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-1910) incorrect schema shown when project-star is used with other projections

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13021895#comment-13021895 ] 

jiraposter@reviews.apache.org commented on PIG-1910:
----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/624/#review499
-----------------------------------------------------------



http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/visitor/LineageFindRelVisitor.java
<https://reviews.apache.org/r/624/#comment1029>

    If there are multiple group-by columns, the group column will be a tuple. This will associate the load function only to the tuple and not the uids of the columns within the tuple.
    Need to associated load function to inner-uids as well like its done in mapMatchLoadFuncToUid


- thejas


On 2011-04-19 21:20:10, Daniel Dai wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/624/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-04-19 21:20:10)
bq.  
bq.  
bq.  Review request for pig and thejas.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  See PIG-1910
bq.  
bq.  
bq.  This addresses bug PIG-1910.
bq.      https://issues.apache.org/jira/browse/PIG-1910
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/expression/DereferenceExpression.java 1095145 
bq.    http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/expression/ExpToPhyTranslationVisitor.java 1095145 
bq.    http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/expression/ProjectExpression.java 1095145 
bq.    http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/relational/LOCogroup.java 1095145 
bq.    http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/visitor/ColumnAliasConversionVisitor.java 1095145 
bq.    http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/visitor/LineageFindRelVisitor.java 1095145 
bq.    http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/visitor/UDFFinder.java PRE-CREATION 
bq.    http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/parser/QueryParserDriver.java 1095145 
bq.    http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/test/TestPigServer.java 1095145 
bq.    http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/test/TestPlanGeneration.java PRE-CREATION 
bq.    http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/test/TestTypeCheckingValidatorNewLP.java 1095145 
bq.    http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/test/Util.java 1095145 
bq.  
bq.  Diff: https://reviews.apache.org/r/624/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Test-patch:
bq.       [exec] +1 overall.  
bq.       [exec] 
bq.       [exec]     +1 @author.  The patch does not contain any @author tags.
bq.       [exec] 
bq.       [exec]     +1 tests included.  The patch appears to include 12 new or modified tests.
bq.       [exec] 
bq.       [exec]     +1 javadoc.  The javadoc tool did not generate any warning messages.
bq.       [exec] 
bq.       [exec]     +1 javac.  The applied patch does not increase the total number of javac compiler warnings.
bq.       [exec] 
bq.       [exec]     +1 findbugs.  The patch does not introduce any new Findbugs warnings.
bq.       [exec] 
bq.       [exec]     +1 release audit.  The applied patch does not increase the total number of release audit warnings.
bq.  
bq.  Unit test:
bq.      all pass
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Daniel
bq.  
bq.



> incorrect schema shown when project-star is used with other projections
> -----------------------------------------------------------------------
>
>                 Key: PIG-1910
>                 URL: https://issues.apache.org/jira/browse/PIG-1910
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Thejas M Nair
>            Assignee: Daniel Dai
>             Fix For: 0.9.0
>
>         Attachments: PIG-1910-1.patch, PIG-1910-2.patch, PIG-1910-3.patch
>
>
> {code}
> grunt> l = load 'x' ;                                       
> grunt> f = foreach l generate $1 as a, *, $2 as b;          
> grunt> describe f;
> f: {a: bytearray,(null),b: bytearray}  -- The tuple returned by * is automatically flattened, so this schema is not correct. It is more accurate to return a null schema.
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIG-1910) incorrect schema shown when project-star is used with other projections

Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Dai updated PIG-1910:
----------------------------

    Attachment: PIG-1910-3.patch

PIG-1910-3.patch pass unit tests and test-patch

> incorrect schema shown when project-star is used with other projections
> -----------------------------------------------------------------------
>
>                 Key: PIG-1910
>                 URL: https://issues.apache.org/jira/browse/PIG-1910
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Thejas M Nair
>            Assignee: Daniel Dai
>             Fix For: 0.9.0
>
>         Attachments: PIG-1910-1.patch, PIG-1910-2.patch, PIG-1910-3.patch
>
>
> {code}
> grunt> l = load 'x' ;                                       
> grunt> f = foreach l generate $1 as a, *, $2 as b;          
> grunt> describe f;
> f: {a: bytearray,(null),b: bytearray}  -- The tuple returned by * is automatically flattened, so this schema is not correct. It is more accurate to return a null schema.
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIG-1910) incorrect schema shown when project-star is used with other projections

Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Dai updated PIG-1910:
----------------------------

    Attachment: PIG-1910-5.patch

> incorrect schema shown when project-star is used with other projections
> -----------------------------------------------------------------------
>
>                 Key: PIG-1910
>                 URL: https://issues.apache.org/jira/browse/PIG-1910
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Thejas M Nair
>            Assignee: Daniel Dai
>             Fix For: 0.9.0
>
>         Attachments: PIG-1910-1.patch, PIG-1910-2.patch, PIG-1910-3.patch, PIG-1910-4.patch, PIG-1910-5.patch
>
>
> {code}
> grunt> l = load 'x' ;                                       
> grunt> f = foreach l generate $1 as a, *, $2 as b;          
> grunt> describe f;
> f: {a: bytearray,(null),b: bytearray}  -- The tuple returned by * is automatically flattened, so this schema is not correct. It is more accurate to return a null schema.
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Assigned: (PIG-1910) incorrect schema shown when project-star is used with other projections

Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olga Natkovich reassigned PIG-1910:
-----------------------------------

    Assignee: Daniel Dai

> incorrect schema shown when project-star is used with other projections
> -----------------------------------------------------------------------
>
>                 Key: PIG-1910
>                 URL: https://issues.apache.org/jira/browse/PIG-1910
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Thejas M Nair
>            Assignee: Daniel Dai
>             Fix For: 0.9.0
>
>
> {code}
> grunt> l = load 'x' ;                                       
> grunt> f = foreach l generate $1 as a, *, $2 as b;          
> grunt> describe f;
> f: {a: bytearray,(null),b: bytearray}  -- The tuple returned by * is automatically flattened, so this schema is not correct. It is more accurate to return a null schema.
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-1910) incorrect schema shown when project-star is used with other projections

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13021808#comment-13021808 ] 

jiraposter@reviews.apache.org commented on PIG-1910:
----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/624/
-----------------------------------------------------------

Review request for pig and thejas.


Summary
-------

See PIG-1910


This addresses bug PIG-1910.
    https://issues.apache.org/jira/browse/PIG-1910


Diffs
-----

  http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/expression/DereferenceExpression.java 1095145 
  http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/expression/ExpToPhyTranslationVisitor.java 1095145 
  http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/expression/ProjectExpression.java 1095145 
  http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/relational/LOCogroup.java 1095145 
  http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/visitor/ColumnAliasConversionVisitor.java 1095145 
  http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/visitor/LineageFindRelVisitor.java 1095145 
  http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/newplan/logical/visitor/UDFFinder.java PRE-CREATION 
  http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/parser/QueryParserDriver.java 1095145 
  http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/test/TestPigServer.java 1095145 
  http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/test/TestPlanGeneration.java PRE-CREATION 
  http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/test/TestTypeCheckingValidatorNewLP.java 1095145 
  http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/test/Util.java 1095145 

Diff: https://reviews.apache.org/r/624/diff


Testing
-------

Test-patch:
     [exec] +1 overall.  
     [exec] 
     [exec]     +1 @author.  The patch does not contain any @author tags.
     [exec] 
     [exec]     +1 tests included.  The patch appears to include 12 new or modified tests.
     [exec] 
     [exec]     +1 javadoc.  The javadoc tool did not generate any warning messages.
     [exec] 
     [exec]     +1 javac.  The applied patch does not increase the total number of javac compiler warnings.
     [exec] 
     [exec]     +1 findbugs.  The patch does not introduce any new Findbugs warnings.
     [exec] 
     [exec]     +1 release audit.  The applied patch does not increase the total number of release audit warnings.

Unit test:
    all pass


Thanks,

Daniel



> incorrect schema shown when project-star is used with other projections
> -----------------------------------------------------------------------
>
>                 Key: PIG-1910
>                 URL: https://issues.apache.org/jira/browse/PIG-1910
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Thejas M Nair
>            Assignee: Daniel Dai
>             Fix For: 0.9.0
>
>         Attachments: PIG-1910-1.patch, PIG-1910-2.patch, PIG-1910-3.patch
>
>
> {code}
> grunt> l = load 'x' ;                                       
> grunt> f = foreach l generate $1 as a, *, $2 as b;          
> grunt> describe f;
> f: {a: bytearray,(null),b: bytearray}  -- The tuple returned by * is automatically flattened, so this schema is not correct. It is more accurate to return a null schema.
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIG-1910) incorrect schema shown when project-star is used with other projections

Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Dai updated PIG-1910:
----------------------------

    Attachment: PIG-1910-4.patch

PIG-1910-4.patch addresses Thejas's review comment.

> incorrect schema shown when project-star is used with other projections
> -----------------------------------------------------------------------
>
>                 Key: PIG-1910
>                 URL: https://issues.apache.org/jira/browse/PIG-1910
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Thejas M Nair
>            Assignee: Daniel Dai
>             Fix For: 0.9.0
>
>         Attachments: PIG-1910-1.patch, PIG-1910-2.patch, PIG-1910-3.patch, PIG-1910-4.patch
>
>
> {code}
> grunt> l = load 'x' ;                                       
> grunt> f = foreach l generate $1 as a, *, $2 as b;          
> grunt> describe f;
> f: {a: bytearray,(null),b: bytearray}  -- The tuple returned by * is automatically flattened, so this schema is not correct. It is more accurate to return a null schema.
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (PIG-1910) incorrect schema shown when project-star is used with other projections

Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Dai resolved PIG-1910.
-----------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]

Patch committed to both trunk and 0.9 branch.

> incorrect schema shown when project-star is used with other projections
> -----------------------------------------------------------------------
>
>                 Key: PIG-1910
>                 URL: https://issues.apache.org/jira/browse/PIG-1910
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Thejas M Nair
>            Assignee: Daniel Dai
>             Fix For: 0.9.0
>
>         Attachments: PIG-1910-1.patch, PIG-1910-2.patch, PIG-1910-3.patch, PIG-1910-4.patch, PIG-1910-5.patch
>
>
> {code}
> grunt> l = load 'x' ;                                       
> grunt> f = foreach l generate $1 as a, *, $2 as b;          
> grunt> describe f;
> f: {a: bytearray,(null),b: bytearray}  -- The tuple returned by * is automatically flattened, so this schema is not correct. It is more accurate to return a null schema.
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-1910) incorrect schema shown when project-star is used with other projections

Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13020166#comment-13020166 ] 

Daniel Dai commented on PIG-1910:
---------------------------------

PIG-1910-1.patch fix the test case in description.

For the other test case in comments, I get:
Invalid field projection. Projected field [b] does not exist in schema:.

Which seems fine. We have no way to translate g into logical plan since we don't know how to translate b into right position.

> incorrect schema shown when project-star is used with other projections
> -----------------------------------------------------------------------
>
>                 Key: PIG-1910
>                 URL: https://issues.apache.org/jira/browse/PIG-1910
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Thejas M Nair
>            Assignee: Daniel Dai
>             Fix For: 0.9.0
>
>         Attachments: PIG-1910-1.patch
>
>
> {code}
> grunt> l = load 'x' ;                                       
> grunt> f = foreach l generate $1 as a, *, $2 as b;          
> grunt> describe f;
> f: {a: bytearray,(null),b: bytearray}  -- The tuple returned by * is automatically flattened, so this schema is not correct. It is more accurate to return a null schema.
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-1910) incorrect schema shown when project-star is used with other projections

Posted by "Thejas M Nair (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022276#comment-13022276 ] 

Thejas M Nair commented on PIG-1910:
------------------------------------

PIG-1910-5.patch looks good. +1

> incorrect schema shown when project-star is used with other projections
> -----------------------------------------------------------------------
>
>                 Key: PIG-1910
>                 URL: https://issues.apache.org/jira/browse/PIG-1910
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Thejas M Nair
>            Assignee: Daniel Dai
>             Fix For: 0.9.0
>
>         Attachments: PIG-1910-1.patch, PIG-1910-2.patch, PIG-1910-3.patch, PIG-1910-4.patch, PIG-1910-5.patch
>
>
> {code}
> grunt> l = load 'x' ;                                       
> grunt> f = foreach l generate $1 as a, *, $2 as b;          
> grunt> describe f;
> f: {a: bytearray,(null),b: bytearray}  -- The tuple returned by * is automatically flattened, so this schema is not correct. It is more accurate to return a null schema.
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIG-1910) incorrect schema shown when project-star is used with other projections

Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Dai updated PIG-1910:
----------------------------

    Attachment:     (was: PIG-1910-5.patch)

> incorrect schema shown when project-star is used with other projections
> -----------------------------------------------------------------------
>
>                 Key: PIG-1910
>                 URL: https://issues.apache.org/jira/browse/PIG-1910
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Thejas M Nair
>            Assignee: Daniel Dai
>             Fix For: 0.9.0
>
>         Attachments: PIG-1910-1.patch, PIG-1910-2.patch, PIG-1910-3.patch, PIG-1910-4.patch, PIG-1910-5.patch
>
>
> {code}
> grunt> l = load 'x' ;                                       
> grunt> f = foreach l generate $1 as a, *, $2 as b;          
> grunt> describe f;
> f: {a: bytearray,(null),b: bytearray}  -- The tuple returned by * is automatically flattened, so this schema is not correct. It is more accurate to return a null schema.
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (PIG-1910) incorrect schema shown when project-star is used with other projections

Posted by "Thejas M Nair (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13007595#comment-13007595 ] 

Thejas M Nair commented on PIG-1910:
------------------------------------

This can also lead to incorrect query plan, if an alias that occurs after the position corresponding to * projection in schema is used. -


{code}
grunt> l = load 'x' ;                                       
grunt> f = foreach l generate $1 as a, *, $2 as b;          
grunt> describe f;
f: {a: bytearray,(null),b: bytearray}
grunt> g  = foreach f generate b;
grunt> explain g;
-- NOTE that alias b is getting translated to column index 2, which is incorrect.
...
...
#--------------------------------------------------
# Map Reduce Plan
#--------------------------------------------------
MapReduce node scope-20
Map Plan
g: Store(fakefile:org.apache.pig.builtin.PigStorage) - scope-19
|
|---g: New For Each(false)[bag] - scope-18
    |   |
    |   Project[bytearray][2] - scope-16
    |
    |---f: New For Each(false,true,false)[bag] - scope-15
        |   |
        |   Project[bytearray][1] - scope-9
        |   |
        |   Project[tuple][*] - scope-11
        |   |
        |   Project[bytearray][2] - scope-13
        |
        |---l: Load(file:///Users/tejas/pig_type/trunk/x:org.apache.pig.builtin.PigStorage) - scope-8--------
Global sort: false
----------------

{code}

This problem will also need to be addressed for the range-projection feature in PIG-1693 .

> incorrect schema shown when project-star is used with other projections
> -----------------------------------------------------------------------
>
>                 Key: PIG-1910
>                 URL: https://issues.apache.org/jira/browse/PIG-1910
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Thejas M Nair
>             Fix For: 0.9.0
>
>
> {code}
> grunt> l = load 'x' ;                                       
> grunt> f = foreach l generate $1 as a, *, $2 as b;          
> grunt> describe f;
> f: {a: bytearray,(null),b: bytearray}  -- The tuple returned by * is automatically flattened, so this schema is not correct. It is more accurate to return a null schema.
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIG-1910) incorrect schema shown when project-star is used with other projections

Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Dai updated PIG-1910:
----------------------------

    Attachment: PIG-1910-2.patch

PIG-1910-2.patch try to fix unit test failures.

> incorrect schema shown when project-star is used with other projections
> -----------------------------------------------------------------------
>
>                 Key: PIG-1910
>                 URL: https://issues.apache.org/jira/browse/PIG-1910
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Thejas M Nair
>            Assignee: Daniel Dai
>             Fix For: 0.9.0
>
>         Attachments: PIG-1910-1.patch, PIG-1910-2.patch
>
>
> {code}
> grunt> l = load 'x' ;                                       
> grunt> f = foreach l generate $1 as a, *, $2 as b;          
> grunt> describe f;
> f: {a: bytearray,(null),b: bytearray}  -- The tuple returned by * is automatically flattened, so this schema is not correct. It is more accurate to return a null schema.
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira