[ https://issues.apache.org/jira/browse/AVRO-1289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Kulp updated AVRO-1289: ------------------------------ Fix Version/s: (was: 1.9.0) > Python: Schema objects should polymorphically interact with data-walker > interface > --------------------------------------------------------------------------------- > > Key: AVRO-1289 > URL: https://issues.apache.org/jira/browse/AVRO-1289 > Project: Apache Avro > Issue Type: Improvement > Components: python > Affects Versions: 1.7.5 > Reporter: Jeremy Kahn > Assignee: Jeremy Kahn > Priority: Minor > Labels: features > > 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 was sent by Atlassian JIRA (v7.6.3#76005)