AVRO-3573: Duplicate symbols (EnumSchema)
If EnumSchema has duplicate symbols, an error will raise. Instead of a list of duplicate symbols or a value of duplicate symbol, error shows all list of symbols. Improvement removes this defect and shows a message "Duplicate symbol" with the symbol, if it is one, or "Duplicates symbols" with the list of duplicate symbols, if there are more than one symbol.
P.S. Tests do not check error's message. Try to write a test for checking a message of an error can take a long time.
Jira
- [x] My PR addresses the following Avro Jira issues and references them in the PR title. For example, "AVRO-1234: My Avro PR"
- https://issues.apache.org/jira/browse/AVRO-XXX
- In case you are adding a dependency, check if the license complies with the ASF 3rd Party License Policy.
Hello, @martin-g! Thanks to the response!
I added two test cases.
Hello, @martin-g!
I fixed test by case intersection. I think escape should be in the code because it is more correct.
Are you still interesting in these changes?
Are you still interesting in these changes?
Yes! A Python developer should review it though before merging. It is planned for 1.11.2/1.12.0
Because I deleted my fork, I can not change this pull request. I created new pull request to this problem: https://github.com/apache/avro/pull/1933.