[
https://issues.apache.org/jira/browse/AVRO-2072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16147089#comment-16147089
]
Zoltan Farkas commented on AVRO-2072:
-------------------------------------
Applying the patch results in some test failures:
Failed tests:
TestReadingWritingDataInEvolvedSchemas.intUnionIsNotConvertedToFloatUnion
Expected test to throw (an instance of org.apache.avro.AvroTypeException and
exception with message a string containing "Found int, expecting union")
TestReadingWritingDataInEvolvedSchemas.longUnionIsNotConvertedToFloatUnion
Expected test to throw (an instance of org.apache.avro.AvroTypeException and
exception with message a string containing "Found long, expecting union")
TestReadingWritingDataInEvolvedSchemas.longWrittenWithUnionSchemaIsConvertedToFloatDoubleUnionSchema:205
expected: java.lang.Double<42.0> but was: java.lang.Float<42.0>
> ResolvingGrammarGenerator doesn't implement schema resolution correctly for
> unions
> ----------------------------------------------------------------------------------
>
> Key: AVRO-2072
> URL: https://issues.apache.org/jira/browse/AVRO-2072
> Project: Avro
> Issue Type: Bug
> Reporter: Nandor Kollar
> Assignee: Nandor Kollar
> Attachments: AVRO-2072.patch
>
>
> According to
> [specification|https://avro.apache.org/docs/current/spec.html#Schema+Resolution],
> int and long is promotable to float, but when using SchemaValidator, a union
> with a single int or long branch is not readable by an union with a float
> branch.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)