You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Thiruvalluvan M. G. (JIRA)" <ji...@apache.org> on 2012/05/13 19:30:51 UTC

[jira] [Updated] (AVRO-1065) NodeRecord::isValid() treats records with no fields as invalid

     [ https://issues.apache.org/jira/browse/AVRO-1065?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thiruvalluvan M. G. updated AVRO-1065:
--------------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

Committed revision 1337946.

                
> NodeRecord::isValid() treats records with no fields as invalid
> --------------------------------------------------------------
>
>                 Key: AVRO-1065
>                 URL: https://issues.apache.org/jira/browse/AVRO-1065
>             Project: Avro
>          Issue Type: Bug
>          Components: c++
>    Affects Versions: 1.6.3
>            Reporter: Keh-Li Sheng
>            Assignee: Thiruvalluvan M. G.
>         Attachments: AVRO-1065.patch
>
>
> Implementation of NodeRecord in NodeImpl.hh requires that a record have at least 1 field in it but this is not required as per the specification at http://avro.apache.org/docs/1.6.3/spec.html#schema_record. Either remove the condition or update the spec. This only seems to be a quirk in c++.
> {code:title=NodeImpl.hh}
> class AVRO_DECL NodeRecord : public NodeImplRecord
> {
>     ...
>     bool isValid() const {
>         return (
>                 (nameAttribute_.size() == 1) && 
>                 (leafAttributes_.size() > 0) &&
>                 (leafAttributes_.size() == leafNameAttributes_.size())
>                );
>     }
> }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira