cewing opened a new pull request #936:
URL: https://github.com/apache/avro/pull/936


   This PR replaces the existing `validate` function in `avro.io` with a new 
version that uses a traversal-based approach rather than a recursive approach.  
It also establishes the concept of a "validator" function that handles 
validation of various schema types and an "iterator" function, which powers the 
traversal of specific schema types.
   
   The point of the work is two-fold.  First, by traversing rather than 
recursing, exceptions raised by validation can be raised immediately where the 
problem happened, allowing for error messages that are much more localized.  
This is an advantage when working with very large schemas.  Second, by using 
traversal instead of recursion, this approach is more conservative of system 
resources, especially for deeply nested schemas.
   
   The goal of this pr specifically is to spur discussion of the approach we've 
taken and to seek approval from the community for the change.  I anticipate 
that it will not be acceptable entirely as-is, and will be happy to make any 
requested changes should the approach be approved.
   
   ### Jira
   
   - [ x] My PR is speculative in nature and is meant to spur discussion and 
approval of the approach.  Once that has happened, I will close this PR and 
open another with an attached JIRA issue.
   
   ### Tests
   
   - [ x] Validation testing is pretty good already, so this PR does not add 
any tests.  If more are required in order to verify the process works, I will 
take responsibility for adding them.
   
   ### Commits
   
   - [ -] My commits are well formed, but as yet there is no JIRA issue so they 
do not reference one.  I can fix that in any final PR to be submitted.
   
   
   
   ### Documentation
   
   - [ x] This PR does not add any new functionality.  It does however alter 
existing functionality, at least in terms of how it is output.  I am very open 
to discussion of the best way to document those changes should they be accepted.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to