You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by GitBox <gi...@apache.org> on 2022/08/08 15:01:02 UTC

[GitHub] [avro] SeanGriffin-Wellsky commented on pull request #1411: AVRO-3257: IDL support for nullable types

SeanGriffin-Wellsky commented on PR #1411:
URL: https://github.com/apache/avro/pull/1411#issuecomment-1208243870

   A "compelling" argument?  No.  I, too, typically prefer specifying "optional" collections as just empty collections.  However, one situation where I can see this not desirable is in a record with a list of mutually-exclusive fields, some of which happen to be collections. In such a schema, it's preferred to have all fields as optional, including the collections, and the inconsistent syntax is unfortunate.. though certainly workable.  Here's a simple example:
   
   ```
   record Foo {
     string? asString;
     boolean? asBoolean;
     union { null, array<string> } asStringArray;
     union { null, array<boolean> } asBooleanArray;
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org