[
https://issues.apache.org/jira/browse/AVRO-2271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16692902#comment-16692902
]
ASF GitHub Bot commented on AVRO-2271:
--------------------------------------
Fokko commented on issue #387: AVRO-2271: C++ Support for Custom Fields
URL: https://github.com/apache/avro/pull/387#issuecomment-440199939
Sad CI:
```
Scanning dependencies of target avrocpp_s
[ 1%] Building CXX object CMakeFiles/avrocpp_s.dir/impl/Compiler.cc.o
/testptch/unknown/lang/c++/impl/Compiler.cc: In function ‘void
avro::addCustomFields(const NodePtr&, const Object&)’:
/testptch/unknown/lang/c++/impl/Compiler.cc:299:53: error: in C++98
‘kKnownFields’ must be initialized by constructor, not by ‘{...}’
"values", "precision", "scale", "namespace"};
^
/testptch/unknown/lang/c++/impl/Compiler.cc:299:53: error: could not convert
‘{"name", "type", "default", "doc", "size", "logicalType", "values",
"precision", "scale", "namespace"}’ from ‘<brace-enclosed initializer
list>’ to ‘const std::__debug::vector<std::basic_string<char>,
std::allocator<std::basic_string<char> > >’
/testptch/unknown/lang/c++/impl/Compiler.cc:300:16: warning: ‘auto’
changes meaning in C++11; please remove it [-Wc++0x-compat]
for (const auto &entry : m) {
^
/testptch/unknown/lang/c++/impl/Compiler.cc:300:22: error: ISO C++ forbids
declaration of ‘entry’ with no type [-fpermissive]
for (const auto &entry : m) {
^
/testptch/unknown/lang/c++/impl/Compiler.cc:300:30: error: range-based
‘for’ loops are not allowed in C++98 mode
for (const auto &entry : m) {
^
/testptch/unknown/lang/c++/impl/Compiler.cc:301:71: error: request for
member ‘first’ in ‘entry’, which is of non-class type ‘const int’
if (std::find(kKnownFields.begin(), kKnownFields.end(), entry.first)
^
/testptch/unknown/lang/c++/impl/Compiler.cc:303:40: error: request for
member ‘first’ in ‘entry’, which is of non-class type ‘const int’
node->addCustomField(entry.first, entry.second);
^
/testptch/unknown/lang/c++/impl/Compiler.cc:303:53: error: request for
member ‘second’ in ‘entry’, which is of non-class type ‘const int’
node->addCustomField(entry.first, entry.second);
^
make[2]: *** [CMakeFiles/avrocpp_s.dir/impl/Compiler.cc.o] Error 1
CMakeFiles/avrocpp_s.dir/build.make:54: recipe for target
'CMakeFiles/avrocpp_s.dir/impl/Compiler.cc.o' failed
make[1]: *** [CMakeFiles/avrocpp_s.dir/all] Error 2
CMakeFiles/Makefile2:425: recipe for target 'CMakeFiles/avrocpp_s.dir/all'
failed
make: *** [all] Error 2
Makefile:147: recipe for target 'all' failed
```
----------------------------------------------------------------
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]
> C++ Support for Custom Fields
> ------------------------------
>
> Key: AVRO-2271
> URL: https://issues.apache.org/jira/browse/AVRO-2271
> Project: Apache Avro
> Issue Type: Bug
> Components: c++
> Affects Versions: 1.8.2
> Reporter: Aniket Mokashi
> Assignee: Aniket Mokashi
> Priority: Major
>
> To support following schemas:
>
> {noformat}
> R"({"type": "string", "logicalType": "foo", "sqlType": "datetime"})",
> R"({"type": "bytes", "logicalType": "decimal", "precision": 12, "scale": 6,
> "sqlType": "datetime"})",
> R"({"type": "null", "extra attribute": "custom field"})",
> R"({"type": "boolean", "extra1": 1, "extra2": 2, "extra3": 3})",
> R"({"type": "fixed", "name": "Test", "size": 1, "extra attribute": 1})",
> R"(["null", \{"type": "string", "extra attribute": "custom field"}])",
> R"([\{"type": "string", "extra attribute": "custom field"}, "null"])",
> {noformat}
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)