Hi Anders,

Do you recall in which Jira did you add these tests? I'd like to indicate
that AVRO-2072 depends on that item too.

As of the compatibility and changing the spec, this should be discussed
here and we should agree in the direction to follow. I'm especially
interested in PMCs and committers opinion about this topic. As far as I
know backward incompatible changes are allowed, but can only be included
into major releases. However I'm not sure how to treat this issue: like you
told users might already rely on this, but it looks like a bug to me, the
Java implementation is not compliant with the spec, while at the same time
(though didn't verify) the Python API might allow reading int unions as
float unions.

What do you think, how should we treat this case?

Thanks,
Nandor

On Wed, Aug 30, 2017 at 2:31 PM, Anders Sundelin <
anders.sunde...@ericsson.com> wrote:

> Hi all,
>
> Thanks Nandor and others for bringing my comment up for discussuion. The
> failing tests were written by me, as I wanted to know how Avro really
> worked - and if we change the behaviour, naturally the tests should be
> updated as well.
> The question is how we should go about this, as it breaks backwards
> compatibility?
>
> Someone might be relying on the non-promotion (not expecting the
> conversion to work). On the other hand, the spec is quite clear on this, so
> it could be seen as a bug, violating the spec. Still, I think it is worthy
> a more general discussion/voting (though I must admit, I am not that well
> versed in the Avro release/contribution process)
>
> On a personal note (though my application does not, to my knowledge, rely
> on floats), I actually would prefer changing the spec, not allowing
> conversion to float. But YMMV,
>
> Thanks for your time,
> /Anders Sundelin
>
>
> -------- Original Message --------
> Subject: [jira] [Commented] (AVRO-2072) ResolvingGrammarGenerator doesn't
> implement schema resolution correctly for unions
> From: "Nandor Kollar (JIRA)" <j...@apache.org>
> Date: 30 aug. 2017 13:55
> To: dev@avro.apache.org
>
>     [ https://issues.apache.org/jira/browse/AVRO-2072?page=
> com.atlassian.jira.plugin.system.issuetabpanels:comment-
> tabpanel&focusedCommentId=16147116#comment-16147116 ]
>
> Nandor Kollar commented on AVRO-2072:
> -------------------------------------
>
> Thanks Zoltan, I'll have a look at the failing tests!
>
> > 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)
>

Reply via email to