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

There should be a way to do schema resolution with SpecificDatumReader

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: java
    • Labels:
      None

      Description

      Presently one could do schema resolution (where the schema of the Avro data stream is different from the Schema desired by the reader) only with GenericDatumReader. A similar facility is needed for SpecificDatumReader as well.

      1. AVRO-304.patch
        1 kB
        Thiruvalluvan M. G.

        Activity

        Hide
        thiru_mg Thiruvalluvan M. G. added a comment -

        This patch addresses this problem.

        Show
        thiru_mg Thiruvalluvan M. G. added a comment - This patch addresses this problem.
        Hide
        cutting Doug Cutting added a comment -

        This is already possible. One creates the SpecificDatumReader using the expected class. The user of the DatumReader (e.g., DataFileReader) can then call setSchema() with the actual schema.

        Show
        cutting Doug Cutting added a comment - This is already possible. One creates the SpecificDatumReader using the expected class. The user of the DatumReader (e.g., DataFileReader) can then call setSchema() with the actual schema.
        Hide
        thiru_mg Thiruvalluvan M. G. added a comment -

        Doug's solution works. Thanks Doug.

        Show
        thiru_mg Thiruvalluvan M. G. added a comment - Doug's solution works. Thanks Doug.

          People

          • Assignee:
            thiru_mg Thiruvalluvan M. G.
            Reporter:
            thiru_mg Thiruvalluvan M. G.
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development