avro icon indicating copy to clipboard operation
avro copied to clipboard

AVRO-3573: Duplicate symbols (EnumSchema)

Open izveigor opened this issue 3 years ago • 2 comments

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.

izveigor avatar Jul 11 '22 09:07 izveigor

Hello, @martin-g! Thanks to the response!

I added two test cases.

izveigor avatar Jul 11 '22 12:07 izveigor

Hello, @martin-g!

I fixed test by case intersection. I think escape should be in the code because it is more correct.

izveigor avatar Jul 11 '22 13:07 izveigor

Are you still interesting in these changes?

izveigor avatar Sep 29 '22 09:09 izveigor

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

martin-g avatar Oct 05 '22 11:10 martin-g

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.

izveigor avatar Oct 26 '22 08:10 izveigor