Avro
  1. Avro
  2. AVRO-304

There should be a way to do schema resolution with SpecificDatumReader

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major 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
        Thiruvalluvan M. G. added a comment -

        This patch addresses this problem.

        Show
        Thiruvalluvan M. G. added a comment - This patch addresses this problem.
        Hide
        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
        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
        Thiruvalluvan M. G. added a comment -

        Doug's solution works. Thanks Doug.

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

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development