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

Stan Rosenberg updated PIG-2330:
--------------------------------

    Attachment: AvroStorage.patch
                input.txt

The problem seems to be localized to only one line of code.
                
> Problem in org.apache.pig.piggybank.storage.avro.AvroStorage when storing a 
> record with a single field.
> -------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2330
>                 URL: https://issues.apache.org/jira/browse/PIG-2330
>             Project: Pig
>          Issue Type: Bug
>          Components: piggybank
>    Affects Versions: 0.9.0
>            Reporter: Stan Rosenberg
>         Attachments: AvroStorage.patch, input.txt
>
>
> Running the following script yields a RuntimeException.  If the schema is 
> changed to contain two fields, then A can be stored successfully.
> {noformat}
> REGISTER 'piggybank.jar'
> REGISTER 'avro-1.5.4.jar'
> REGISTER 'json-simple-1.1.jar'
> A = load 'input.txt' AS (name1:chararray, name2:chararray);
> B = foreach A generate $0;
> store B into './output' using 
> org.apache.pig.piggybank.storage.avro.AvroStorage(
> '{"schema": {"type": "record", "name": "main", "fields": [{"name": "name", 
> "type": ["null", "string"]}]}}');
> {noformat}

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