eyad-hazem-elmorsy opened a new pull request, #3384:
URL: https://github.com/apache/fory/pull/3384

   ## Why?
   
   This PR handles the duplicate of field names for inheritance.
   
   ## What does this PR do?
   
   The handling is done by making every child class's field override its 
parent's till the most-derived field kept.
   - First, we iterate over the full class MRO (cls.__mro__) to extract field 
metadata from all parent classes.
   - Then, deduplicate fields so that each field name appears only once in the 
resulting list with keeping the child class definition if a field is shadowed.
   - Finally, added some tests to cover:
       - Single-level inheritance
       - Multi-level inheritance
       - Field shadowing in child and grandchild classes
       - Deduplication of overridden fields
   
   - [ ] Does this PR introduce any public API change?
   - [ ] Does this PR introduce any binary protocol compatibility change?


-- 
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.

To unsubscribe, e-mail: [email protected]

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to