[prev in list] [next in list] [prev in thread] [next in thread] 

List:       avro-dev
Subject:    Re: [jira] [Resolved] (AVRO-1849) C++ printJson fails on record with no fields
From:       Simon Woodford <simonwoodford () gmail ! com>
Date:       2016-09-27 21:37:20
Message-ID: CAK7GPaZh7q1DeoHQNz78XmMGbPOs8kUmnNYjPnqDvktbMLOZnQ () mail ! gmail ! com
[Download RAW message or body]


Thanks Tom, thanks Zoltan.

Regards

Simon
On 27 Sep 2016 15:55, "Tom White (JIRA)" <jira@apache.org> wrote:

>
>      [ https://issues.apache.org/jira/browse/AVRO-1849?page=com.
> atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Tom White resolved AVRO-1849.
> -----------------------------
>        Resolution: Fixed
>          Assignee: Simon Woodford
>      Hadoop Flags: Reviewed
>     Fix Version/s: 1.9.0
>
> I just committed this. Thanks Simon (and Zoltan for reviewing).
>
> > C++ printJson fails on record with no fields
> > --------------------------------------------
> >
> >                 Key: AVRO-1849
> >                 URL: https://issues.apache.org/jira/browse/AVRO-1849
> >             Project: Avro
> >          Issue Type: Bug
> >          Components: c++
> >    Affects Versions: 1.7.7, 1.8.0
> >         Environment: Not relevant
> >            Reporter: Simon Woodford
> >            Assignee: Simon Woodford
> >            Priority: Minor
> >             Fix For: 1.9.0
> >
> >
> > The function NodeRecord::printJson in lang/c++/impl/NodeImpl.cc does not
> correctly handle a record with no fields. It injects an extra closing curly
> brace, and the result is invalid JSON.
> > Starting with a schema
> > {
> >   "type": "record",
> >   "name": "Example",
> >   "fields" : [
> >   ]
> > }
> > and parsing it to create a ValidSchema, then calling toJson on the
> ValidSchema generates
> > {
> >   "type": "record",
> >   "name": "Example",
> >   "fields" : [
> >     }
> >   ]
> > }
> > A record with no fields is unusual but we have encountered use cases for
> it, avro does not invalidate a record with no fields, and I've confirmed
> that Java, C and C# handle this case correctly. (I have not checked the
> other supported languages.)
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.3.4#6332)
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic