avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
Subject Re: Always getting a value...
Date Thu, 27 Nov 2014 00:37:29 GMT
On Wed, Nov 26, 2014 at 2:33 PM, svante karlsson <saka@csi.se> wrote:
> I'm not sure that works for avro where null is used for an optional field.

It should work.  If it doesn't, it's a bug.  For example:

record Foo {
  union {string, null} name = "default";
}

record Bar {
  union {Foo, null} foo = {"name" = "non-default"};
}

Default values in IDL are JSON format.

Doug

Mime
View raw message