You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "Mark Paxton (Jira)" <ji...@apache.org> on 2023/07/07 12:56:00 UTC
[jira] [Comment Edited] (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:comment-tabpanel&focusedCommentId=17741015#comment-17741015 ]
Mark Paxton edited comment on AVRO-3792 at 7/7/23 12:55 PM:
------------------------------------------------------------
Looking forward to the merge. Thanks for the response :)
was (Author: JIRAUSER301245):
Looking forward to the merge.
> 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
>
> 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)