You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Jeremy Kahn (JIRA)" <ji...@apache.org> on 2013/04/04 20:15:15 UTC

[jira] [Created] (AVRO-1289) Python: Schema objects should polymorphically interact with data-walker interface

Jeremy Kahn created AVRO-1289:
---------------------------------

             Summary: Python: Schema objects should polymorphically interact with data-walker interface
                 Key: AVRO-1289
                 URL: https://issues.apache.org/jira/browse/AVRO-1289
             Project: Avro
          Issue Type: Improvement
          Components: python
    Affects Versions: 1.7.5
            Reporter: Jeremy Kahn
            Assignee: Jeremy Kahn
            Priority: Minor
             Fix For: 1.8.0


Python {{avro.schema}} objects should be able to call back to a general data-and-schema parallel-walker ("validate" would be one of those, but so could be "default-filler"). 

There should be an {{avro.walker}} interface that owns the parallel state (a datum-reader/deserializer, a datum-writer/serializer, a validator, or a default-filler -- see AVRO-1265). Schema polymorphism would allow us to eliminate the large (and highly redundant) function-dispatch methods in {{avro.io}} by making the {{avro.schema.Schema}} subclass responsible for calling back to the {{avro.walker}} object.

Assigning this to v1.8.0 because it may be difficult to duplicate *every* behavior of 1.7.* with the same function signatures, especially where this refactor may be eliminate entire classes.

This factoring ought to make it easier to improve or extend objects that meet this {{walker}} interface -- validators & serializers might be able to store more state about their position within a record, for example, to yield more informative error messages upon mismatch (as requested by Jonathan Coveney on the user mailing list).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira