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

Reply via email to