Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
Description
To define optional values, Avro has the "union with the null type" construction.
In IDL, this is a rather verbose construct:
union {null, string} optionalName = null;
Wish: add Kotlin style optional types like this:
string? optionalName = null;
The resulting schema should be identical; it's only a syntax change.
Note: it would be nice (but not required) if the syntax would also work if the default value is not null:
string? optionalName = "Jane Doe";
Attachments
Issue Links
- links to