[
https://issues.apache.org/jira/browse/KAFKA-3803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15319879#comment-15319879
]
Ewen Cheslack-Postava commented on KAFKA-3803:
----------------------------------------------
Part of the problem might be that it is preferred by the original author (i.e.
me) because dealing with byte[] and it's comparison semantics (or lack thereof)
is painful, but not necessarily preferred by the framework or Kafka in general.
As mentioned briefly elsewhere, I think the challenge is making this work well
for both cases, work consistently, and not surprise anybody (and {{byte[]}}
comparisons working *might* surprise some people).
> JsonConverter deserialized Struct containing bytes field does not return true
> for equals()
> ------------------------------------------------------------------------------------------
>
> Key: KAFKA-3803
> URL: https://issues.apache.org/jira/browse/KAFKA-3803
> Project: Kafka
> Issue Type: Bug
> Components: KafkaConnect
> Affects Versions: 0.10.0.0
> Reporter: Ewen Cheslack-Postava
>
> The problem is that byte[] comparisons will return false for equality, so
> even if the two are effectively equal, Struct.equals will not return true.
> It's unclear if this should be fixed or not. Equality wouldn't work for map
> or array types containing bytes either. However, on possibility is making
> ByteBuffer the default instead to alleviate this, although then we may end up
> with asymmetry in equality.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)