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
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