Hello!  I don't think SDKs should be generating namespaces that
contain invalid names in any cases, and this is a bug in the Java SDK.

One of the unfortunate consequences of "bad" names is that names are
never _really_ necessary to deserialize/serialize data, so someone can
be using the same language SDK over several versions with buggy names
and never notice until they try and interop with another language...

I think the right thing to do is fix the Java SDK, and use a system
property / schema aliases to help people migrate back to the correct
behaviour.  If you are actually using Avro/Protobuf together, you
might be the best person to help us figure out the right was to do
this migration!

All my best, Ryan

On Fri, Aug 11, 2023 at 6:04 PM Kousuke Saruta <[email protected]> wrote:
>
> Hi Martin,
> Thank you for the comment.
>
>
> > Hi,
> >
> > On Wed, Aug 9, 2023 at 6:30 PM Kousuke Saruta <[email protected]> wrote:
> >
> > > Hi developers,
> > >
> > > I'd like to discuss the specification of namespace.
> > > According to the specification, each dot separated portion of a namespace
> > > should be [a-zA-Z_]][a-zA-Z0-9_]*.
> > > https://avro.apache.org/docs/1.11.1/specification/#names
> > >
> > > But the actual implementations of some language bindings don't follow the
> > > specification, and accept any characters.
> > > Especially, the Java binding generates namespaces which contain "$" for
> > > inner classes generated by protobuf.
> > >
> > > So, should we need to review the namespace specification?
> > >
> >
> > To the developers who are familiar with the Java SDK: What problems do you
> > see if the generator stops producing "$", i.e. do something like
> > generated.replace('$', '') ?
> > Would that break existing apps ?
> >
>
> If we replace "$" with any other character in the new version of Avro,
> data serialized by an old Avro cannot be converted back to protobuf format,
> right?
>
> 2023年8月10日(木) 16:38 Martin Grigorov <[email protected]>:
>
> > Hi,
> >
> > On Wed, Aug 9, 2023 at 6:30 PM Kousuke Saruta <[email protected]> wrote:
> >
> > > Hi developers,
> > >
> > > I'd like to discuss the specification of namespace.
> > > According to the specification, each dot separated portion of a namespace
> > > should be [a-zA-Z_]][a-zA-Z0-9_]*.
> > > https://avro.apache.org/docs/1.11.1/specification/#names
> > >
> > > But the actual implementations of some language bindings don't follow the
> > > specification, and accept any characters.
> > > Especially, the Java binding generates namespaces which contain "$" for
> > > inner classes generated by protobuf.
> > >
> > > So, should we need to review the namespace specification?
> > >
> >
> > To the developers who are familiar with the Java SDK: What problems do you
> > see if the generator stops producing "$", i.e. do something like
> > generated.replace('$', '') ?
> > Would that break existing apps ?
> >
> >
> >
> > >
> > > Thanks,
> > > Kousuke
> > >
> >

Reply via email to