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

ASF GitHub Bot commented on AVRO-1702:
--------------------------------------

thiru-apache commented on a change in pull request #302: AVRO-1702: Added 
support for logical types in the C++ client.
URL: https://github.com/apache/avro/pull/302#discussion_r178461969
 
 

 ##########
 File path: lang/c++/impl/Compiler.cc
 ##########
 @@ -100,6 +100,17 @@ static NodePtr makeNode(const std::string& t, 
SymbolTable& st, const string& ns)
     throw Exception(boost::format("Unknown type: %1%") % n.fullname());
 }
 
+/** Returns "true" if the field is in the container */
+// e.g.: can be false for non-mandatory fields
+bool containsField(const Entity& e, const Object& m, const string& fieldName) {
+    Object::const_iterator it = m.find(fieldName);
+    if (it == m.end()) {
 
 Review comment:
   A much simpler expression could be `return (it != m.end())`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Add LogicalType support to c++ library
> --------------------------------------
>
>                 Key: AVRO-1702
>                 URL: https://issues.apache.org/jira/browse/AVRO-1702
>             Project: Avro
>          Issue Type: New Feature
>          Components: c++
>            Reporter: peter liu
>            Assignee: peter liu
>            Priority: Major
>
> I'd like to port the logicaltype support to c++ library



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to