Re: Accessing default value in schema

2019-11-21 Thread Mark Petronic
Thank you very much for your reply. That was very helpful and solved my issue. I need: int32_t n = default.value(); On Tue, Nov 19, 2019, 12:28 PM Dan Schmitt wrote: > It can't tell from your use what type to return/cast the value to so > its failing. > > default_value.value(); > > will try

Re: Accessing default value in schema

2019-11-19 Thread Dan Schmitt
It can't tell from your use what type to return/cast the value to so its failing. default_value.value(); will try to do it as an int64_t to match the long. Alternatively you should be able to do int64_t value = default_value.value(); and it can guess the type there. I suspect your pro

Accessing default value in schema

2019-11-19 Thread Mark Petronic
I am getting back into C++ but don't have much experience with templates so I am a reaching out for a hint here. I am trying to iterate over all the NodePrt nodes starting with the root node using avro::NodePtr& root = schema.root(); But I just cannot figure out how to code up the method call to ge