[
https://issues.apache.org/jira/browse/AVRO-1701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14716025#comment-14716025
]
peter liu commented on AVRO-1701:
---------------------------------
I think the schemas are different, one is the writer schema bigrecord, the
other is the reader schema bigrecord_r
{code:none}
LiuYanbos-MacBook:avro liuyanbo$ diff lang/c++/jsonschemas/bigrecord
lang/c++/jsonschemas/bigrecord_r
9a10,16
> "name": "mymap",
> "type": {
> "type": "map",
> "values": "int"
> }
> },
> {
16,19d22
< "name": "inval1",
< "type": "double"
< },
< {
23a27,30
> "name": "inval1",
> "type": "double"
> },
> {
31c38
< "name": "mymap",
---
> "name": "recordmap",
34c41
< "values": "int"
---
> "values": "Nested"
38c45
< "name": "recordmap",
---
> "name": "withDefaultValue",
40,41c47,74
< "type": "map",
< "values": "Nested"
---
> "type": "record",
> "name": "WithDefaultValue",
> "fields": [
> {
> "name": "s1",
> "type": "string"
> },
> {
> "name": "d1",
> "type": "double"
> },
> {
> "name": "i1",
> "type": "int"
> }
> ]
> },
> "default": {
> "s1": "sval",
> "d1": 5.67,
> "i1": 99
> }
> },
> {
> "name": "union1WithDefaultValue",
> "type": [ "string", "int" ],
> "default": {
> "string": "sval"
44a78,82
> "name": "union2WithDefaultValue",
> "type": [ "string", "null" ],
> "default": null
> },
> {
73c111,112
< ]
---
> ],
> "default": null
90a130,149
> "name": "rwd",
> "type": {
> "type": "record",
> "name": "RecordWithDefault",
> "fields": [
> {
> "name": "rwd_f1",
> "type": "Nested"
> }
> ]
> },
> "default": {
> "rwd_f1": {
> "inval2": "hello",
> "inval1": 4.23,
> "inval3": 100
> }
> }
> },
> {
{code}
> warning: comparison between 'const enum testgen_r::ExampleEnum' and 'const
> enum testgen::ExampleEnum'
> -----------------------------------------------------------------------------------------------------
>
> Key: AVRO-1701
> URL: https://issues.apache.org/jira/browse/AVRO-1701
> Project: Avro
> Issue Type: Bug
> Components: c++
> Affects Versions: 1.7.7
> Reporter: peter liu
> Assignee: peter liu
> Priority: Minor
> Attachments: AVRO-1701.1.patch
>
>
> saw below warning while compiling with g++ 4.2 and g++ 4.8 on mac os and linux
> {quote}
> [ 85%] Building CXX object
> CMakeFiles/AvrogencppTests.dir/test/AvrogencppTests.cc.o
> In file included from
> /Users/liuyanbo/Downloads/boost_1_56_0/boost/test/impl/framework.ipp:29:0,
> from
> /Users/liuyanbo/Downloads/boost_1_56_0/boost/test/included/unit_test.hpp:20,
> from
> /Users/liuyanbo/Downloads/boost_1_56_0/boost/test/included/unit_test_framework.hpp:2,
> from
> /Users/liuyanbo/git/avro/lang/c++/test/AvrogencppTests.cc:33:
> /Users/liuyanbo/Downloads/boost_1_56_0/boost/test/test_tools.hpp: In
> instantiation of 'boost::test_tools::predicate_result
> boost::test_tools::tt_detail::equal_impl(const Left&, const Right&) [with
> Left = testgen_r::ExampleEnum; Right = testgen::ExampleEnum]':
> /Users/liuyanbo/Downloads/boost_1_56_0/boost/test/test_tools.hpp:560:40:
> required from 'boost::test_tools::predicate_result
> boost::test_tools::tt_detail::equal_impl_frwd::call_impl(const Left&, const
> Right&, mpl_::false_) const [with Left = testgen_r::ExampleEnum; Right =
> testgen::ExampleEnum; mpl_::false_ = mpl_::bool_<false>]'
> /Users/liuyanbo/Downloads/boost_1_56_0/boost/test/test_tools.hpp:575:56:
> required from 'boost::test_tools::predicate_result
> boost::test_tools::tt_detail::equal_impl_frwd::operator()(const Left&, const
> Right&) const [with Left = testgen_r::ExampleEnum; Right =
> testgen::ExampleEnum]'
> /Users/liuyanbo/Downloads/boost_1_56_0/boost/test/test_tools.hpp:523:1:
> required from 'bool boost::test_tools::tt_detail::check_frwd(Pred, const
> boost::unit_test::lazy_ostream&, boost::test_tools::const_string,
> std::size_t, boost::test_tools::tt_detail::tool_level,
> boost::test_tools::tt_detail::check_type, const Arg0&, const char*, const
> Arg1&, const char*) [with Pred =
> boost::test_tools::tt_detail::equal_impl_frwd; Arg0 = testgen_r::ExampleEnum;
> Arg1 = testgen::ExampleEnum; boost::test_tools::const_string =
> boost::unit_test::basic_cstring<const char>; std::size_t = long unsigned int]'
> /Users/liuyanbo/git/avro/lang/c++/test/AvrogencppTests.cc:124:5: required
> from 'void checkRecord(const T1&, const T2&) [with T1 =
> testgen_r::RootRecord; T2 = testgen::RootRecord]'
> /Users/liuyanbo/git/avro/lang/c++/test/AvrogencppTests.cc:180:23: required
> from here
> /Users/liuyanbo/Downloads/boost_1_56_0/boost/test/test_tools.hpp:536:17:
> warning: comparison between 'const enum testgen_r::ExampleEnum' and 'const
> enum testgen::ExampleEnum' [-Wenum-compare]
> return left == right;
> ^
> {quote}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)