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

Fabian Alenius updated PIG-2684:
--------------------------------

    Description: 
There appears to be a bug in AvroStorage which causes it to fail when there are 
field names that contain ::

For example, the following will fail:

data = load 'test.txt' as (one, two);
grp = GROUP data by (one, two);
result = foreach grp generate FLATTEN(group);                                   
                                                                                
                                                                
store result into 'test.avro' using 
org.apache.pig.piggybank.storage.avro.AvroStorage();


While the following will succeed:

data = load 'test.txt' as (one, two);
grp = GROUP data by (one, two);
result = foreach grp generate FLATTEN(group) as (one,two);                      
                                                       
store result into 'test.avro' using 
org.apache.pig.piggybank.storage.avro.AvroStorage();


Here is a minimal test case:

data = load 'test.txt' as (one::two, three);                                    
                                                                                
store data into 'test.avro' using 
org.apache.pig.piggybank.storage.avro.AvroStorage();

  was:
There appears to be a bug in AvroStorage which causes it to fail when there are 
field names that contain ::

For example, the following will fail:

data = load 'test.txt' as (one, two);
grp = GROUP data by (one, two);
result = foreach grp generate
        FLATTEN(group);                                                         
                                                                                
                                          
store result into 'test.avro' using 
org.apache.pig.piggybank.storage.avro.AvroStorage();


While the following will succeed:

data = load 'test.txt' as (one, two);
grp = GROUP data by (one, two);
result = foreach grp generate
        FLATTEN(group) as (one,two);                                            
                                 
store result into 'test.avro' using 
org.apache.pig.piggybank.storage.avro.AvroStorage();


Here is a minimal test case:

data = load 'test.txt' as (one::two, three);                                    
                                                                                
store data into 'test.avro' using 
org.apache.pig.piggybank.storage.avro.AvroStorage();

    
> :: in field name causes AvroStorage to fail
> -------------------------------------------
>
>                 Key: PIG-2684
>                 URL: https://issues.apache.org/jira/browse/PIG-2684
>             Project: Pig
>          Issue Type: Bug
>          Components: piggybank
>            Reporter: Fabian Alenius
>
> There appears to be a bug in AvroStorage which causes it to fail when there 
> are field names that contain ::
> For example, the following will fail:
> data = load 'test.txt' as (one, two);
> grp = GROUP data by (one, two);
> result = foreach grp generate FLATTEN(group);                                 
>                                                                               
>                                                                     
> store result into 'test.avro' using 
> org.apache.pig.piggybank.storage.avro.AvroStorage();
> While the following will succeed:
> data = load 'test.txt' as (one, two);
> grp = GROUP data by (one, two);
> result = foreach grp generate FLATTEN(group) as (one,two);                    
>                                                          
> store result into 'test.avro' using 
> org.apache.pig.piggybank.storage.avro.AvroStorage();
> Here is a minimal test case:
> data = load 'test.txt' as (one::two, three);                                  
>                                                                               
>     
> store data into 'test.avro' using 
> org.apache.pig.piggybank.storage.avro.AvroStorage();

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to