You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Louie Larson (JIRA)" <ji...@apache.org> on 2014/12/29 18:41:13 UTC

[jira] [Created] (PIG-4363) AvroStorage.checkSchema() ignores Avro schema passed to constructor

Louie Larson created PIG-4363:
---------------------------------

             Summary: AvroStorage.checkSchema() ignores Avro schema passed to constructor
                 Key: PIG-4363
                 URL: https://issues.apache.org/jira/browse/PIG-4363
             Project: Pig
          Issue Type: Bug
    Affects Versions: 0.13.0, 0.14.0
         Environment: N/A
            Reporter: Louie Larson
            Priority: Trivial


When storing data using {{AvroStorage(<schema>)}}, its {{checkSchema()}} method will still attempt to convert the {{ResourceSchema}} passed from Pig into an Avro {{Schema}}. It should only attempt to do this when {{getProperties().getProperty(OUTPUT_AVRO_SCHEMA)}} is null.

I discovered this when I tried to store a relation with fields that had double colons, calling {{AvroStorage}} with a user-defined schema, but I still got the following error:

{noformat}
Pig Schema contains a name that is not allowed in Avro
{noformat}

Using {{AvroStorage(<schema>, '-d')}} is a good workaround for now.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)