You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2023/07/07 12:58:00 UTC
[jira] [Updated] (AVRO-3792) GenericData compare fails for Maps size = 0 or sizes not same
[ https://issues.apache.org/jira/browse/AVRO-3792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated AVRO-3792:
---------------------------------
Labels: pull-request-available (was: )
> 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
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> 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)