You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Alan Gates (JIRA)" <ji...@apache.org> on 2011/07/16 00:06:00 UTC

[jira] [Updated] (PIG-2050) Pig shows auto-generated schema name for TOTUPLE in describe

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

Alan Gates updated PIG-2050:
----------------------------

    Summary: Pig shows auto-generated schema name for TOTUPLE in describe  (was: Pig can't reference auto-generated schema name for TOTUPLE)

> Pig shows auto-generated schema name for TOTUPLE in describe
> ------------------------------------------------------------
>
>                 Key: PIG-2050
>                 URL: https://issues.apache.org/jira/browse/PIG-2050
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.8.0, 0.9.0
>            Reporter: Richard Ding
>            Priority: Minor
>
> Here is the use case:
> {code}
> grunt> A = load 'data' as (a0, a1, a2); 
> grunt> B = foreach A generate TOTUPLE(a0, a2);      
> grunt> describe B
> B: {org.apache.pig.builtin.totuple_a0_3: (a0: bytearray,a2: bytearray)}
> grunt> C = foreach B generate org.apache.pig.builtin.totuple_a0_3;
> 2011-05-06 14:38:14,635 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Invalid alias: org in {org.apache.pig.builtin.totuple_a0_1: (a0: bytearray,a2: bytearray)}
> {code}
> The workaround is to specify a use-defined schema name:
> {code}
> grunt> A = load 'data' as (a0, a1, a2);                                              
> grunt> B = foreach A generate TOTUPLE(a0, a2) as aa;              
> grunt> describe B                                                 
> B: {aa: (a0: bytearray,a2: bytearray)}
> grunt> C = foreach B generate aa;                                 
> grunt> 
> {code}

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