Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-4363

AvroStorage.checkSchema() ignores Avro schema passed to constructor

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • 0.13.0, 0.14.0
    • None
    • None
    • N/A

    Description

      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:

      Pig Schema contains a name that is not allowed in Avro
      

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

      Attachments

        Activity

          People

            Unassigned Unassigned
            elesel Louie Larson
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: