avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thiruvalluvan M. G. (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AVRO-1065) NodeRecord::isValid() treats records with no fields as invalid
Date Wed, 09 May 2012 07:24:16 GMT

    [ https://issues.apache.org/jira/browse/AVRO-1065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271177#comment-13271177
] 

Thiruvalluvan M. G. commented on AVRO-1065:
-------------------------------------------

I'll commit this soon if there are no objections.
                
> 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

        

Mime
View raw message