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

C implementation requires you to know a file's schema before reading

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3.0
    • 1.4.0
    • c
    • None

    Description

      The C implementation gives the user no way of reading the objects in a data file without knowing the file's schema ahead of time.

      While it does fill in the writers_schema part of the avro_file_reader_t on read, this field is not available to the API as it is left out of avro.h. Two options persent itself: 1) preserve the API as is and add a avro_schema_from_file_reader() function or 2) move the avro_file_reader_t and avro_file_writer_t structs to avro.h.

      A third option, that I don't approve of, is providing a function that reads from a datafile but uses the writers_schema in the reader given instead of requiring another schema to be passed into it. This is problematic because anyone using the API would have fewer debugging and testing options when dealing with interop datasets. Any problem that occurs might just be the schema in the file being off, or whatever.

      Attachments

        1. AVRO-465-schema_for_reader.patch
          0.5 kB
          Jeff Hodges

        Activity

          People

            Unassigned Unassigned
            jmhodges Jeff Hodges
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: