You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Mark Paxton (Jira)" <ji...@apache.org> on 2023/07/07 12:27:00 UTC
[jira] [Created] (AVRO-3792) GenericData compare fails for Maps size = 0 or sizes not same
Mark Paxton created AVRO-3792:
---------------------------------
Summary: GenericData compare fails for Maps size = 0 or sizes not same
Key: AVRO-3792
URL: https://issues.apache.org/jira/browse/AVRO-3792
Project: Apache Avro
Issue Type: Bug
Components: java
Affects Versions: 1.11.2
Reporter: Mark Paxton
Comparison of GenericData in the java avro library is incorrectly implemented.
Two bugs exists:
1) Shortcut returning of 'different' is wrong, since it compares m1.size() != m1.size() instead of m1.size() != m2.size()
2) When one of both maps are empty, the iterator throws an exception. There is no 'isEmpty' check.
See PR: [https://github.com/apache/avro/pull/2325]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)