[
https://issues.apache.org/jira/browse/AVRO-1533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14051579#comment-14051579
]
Martin Kleppmann commented on AVRO-1533:
----------------------------------------
[~cutting]: Ok, in that case I think this is fine. I'm in favour of option 3
(making schema validation and other language implementations' resolvers
consistent with the updated spec).
Perhaps we should also make explicit in the spec that the promotion from bytes
to string is lossy if the byte sequence is not valid UTF-8. (There is already
precedent for lossy promotion: e.g. converting {{long}} to {{float}} may also
lose some precision. That isn't a problem as long as people understand what's
happening.)
> permit promotions between string and bytes
> ------------------------------------------
>
> Key: AVRO-1533
> URL: https://issues.apache.org/jira/browse/AVRO-1533
> Project: Avro
> Issue Type: New Feature
> Components: java
> Reporter: Doug Cutting
> Assignee: Doug Cutting
> Fix For: 1.7.7
>
> Attachments: AVRO-1533.patch, AVRO-1533.patch
>
>
> Avro strings are a subset of bytes, so promoting from string to bytes is
> lossless and should be possible. Promotion from bytes to strings may cause
> problems, as not all byte strings are valid UTF8, but it also might be useful.
--
This message was sent by Atlassian JIRA
(v6.2#6252)