Uploaded image for project: 'Avro'
  1. Avro
  2. AVRO-675

Bytes and fixed setters don't update datum size

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.5.0
    • Component/s: c
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The setter methods for bytes and fixed datum instances don't update the size field. So, for instance, if you create a datum:

      avro_datum_t datum = avro_wrapbytes(NULL, 0);

      Then later you update that datum to point to a different buffer:

      avro_wrapbytes_set(datum, "hello", 5);

      If you write that datum out to a file, you'll get a zero-length value in the output, since the size pointer didn't get updated from 0 to 5.

        Attachments

        1. avro-675.patch
          3 kB
          Douglas Creager

          Activity

            People

            • Assignee:
              dcreager Douglas Creager
              Reporter:
              dcreager Douglas Creager
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0.25h
                0.25h
                Remaining:
                Remaining Estimate - 0.25h
                0.25h
                Logged:
                Time Spent - Not Specified
                Not Specified