You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Daniel Dai (JIRA)" <ji...@apache.org> on 2010/12/24 03:33:45 UTC

[jira] Resolved: (PIG-749) No attempt to check if 'flatten(group) as' has the same cardinality as 'group alias by'

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

Daniel Dai resolved PIG-749.
----------------------------

    Resolution: Fixed

Error message is enhanced by PIG-1737. Now the error message becomes:
ERROR 1117: Cannot merge (group::col1:chararray,group::col2:chararray,group::col3:int) with user defined schema (col1:NULL,col2:NULL,col3:NULL,col4:NULL)

> No attempt to check if 'flatten(group) as' has the same cardinality as 'group alias by'
> ---------------------------------------------------------------------------------------
>
>                 Key: PIG-749
>                 URL: https://issues.apache.org/jira/browse/PIG-749
>             Project: Pig
>          Issue Type: Bug
>          Components: grunt
>    Affects Versions: 0.3.0
>            Reporter: Viraj Bhat
>            Assignee: Alan Gates
>            Priority: Minor
>             Fix For: 0.9.0
>
>
> Pig script which does grouping for 3 columns and flattens as 4 columns works when in principle it should not and maybe fail as a front-end error.
> {code}
> A = load 'groupcardinalitycheck.txt' using PigStorage() as (col1:chararray, col2:chararray, col3:int, col4:chararray);
> B = group A by (col1, col2, col3);
> C = foreach B generate
>            flatten(group) as (col1, col2, col3, col4),
>            SIZE(A) as frequency;
> dump C;
> {code}
> ==========================================================================================
> Data
> ==========================================================================================
> hello   CC      1       there
> hello   YSO     2       out
> ouch    CC      2       hey
> ==========================================================================================
> Result of the preceding script
> ==========================================================================================
> (ouch,CC,2,1L)
> (hello,CC,1,1L)
> (hello,YSO,2,1L)
> ==========================================================================================

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