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

Write API for Avro[Tuple|Map|Bag]wrapper classes is broken

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      AvroTupleWrapper, AvroMapWrapper and AvroBagWrapper expose write APIs but their implementation is broken.

      For instance, we can do

      Tuple t = TupleFactory.newInstnace().newTuple(1);
      t.set(0, 0);
      avroTupleWrapper.set(0, t);
      avroTupleWrapper.get(0);  
      

      The last line will (in most cases) fail depending upon what the avro schema is for the 0th element.

      I'm attaching a patch which highlights this more concretely. The patch only shows failures in AvroTupleWrapper but similar problems exist in corresponding Map and Bag classes

      Attachments

        1. write_interface_broken.patch
          3 kB
          Ratandeep Ratti

        Activity

          People

            Unassigned Unassigned
            rdsr Ratandeep Ratti
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: