avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Torop <rob.to...@gmail.com>
Subject optional values
Date Mon, 06 Nov 2017 22:11:13 GMT
I will be creating some idl  where the records have many fields, most of
which are optional, and I'm looking for the most concise way to do it.
Suppose I have something like this

protocol someproto {
     record somerec {
            typea a;
            typeb b;
      }
}

I want both a and b to be optional.  Do I need to do this?

protocol someproto {
   record somerec {
       union { null, typea } a = null;
       union { null, typeb}  b = null;
  }
}

Mime
View raw message