Pig
  1. Pig
  2. PIG-2330

Problem in org.apache.pig.piggybank.storage.avro.AvroStorage when storing a record with a single field.

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.9.0
    • Fix Version/s: None
    • Component/s: piggybank
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      Running the following script yields a RuntimeException. If the schema is changed to contain two fields, then A can be stored successfully.

      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"]}]}}');
      
      1. input.txt
        0.0 kB
        Stan Rosenberg
      2. AvroStorage.patch
        0.5 kB
        Stan Rosenberg

        Issue Links

          Activity

          Stan Rosenberg created issue -
          Stan Rosenberg made changes -
          Field Original Value New Value
          Attachment input.txt [ 12499956 ]
          Attachment AvroStorage.patch [ 12499957 ]
          Egil Sorensen made changes -
          Link This issue is duplicated by PIG-3322 [ PIG-3322 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Stan Rosenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Development