You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/08/08 04:46:00 UTC

[jira] [Work logged] (AVRO-3257) IDL: add syntax to create optional fields

     [ https://issues.apache.org/jira/browse/AVRO-3257?focusedWorklogId=798773&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-798773 ]

ASF GitHub Bot logged work on AVRO-3257:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 08/Aug/22 04:45
            Start Date: 08/Aug/22 04:45
    Worklog Time Spent: 10m 
      Work Description: andye2004 commented on PR #1411:
URL: https://github.com/apache/avro/pull/1411#issuecomment-1207660333

   Was this change ever intended to work with array and map types? It's working perfectly with basic/object types but not with collections.
   
   Cheers, Andy.




Issue Time Tracking
-------------------

    Worklog Id:     (was: 798773)
    Time Spent: 3h 50m  (was: 3h 40m)

> IDL: add syntax to create optional fields
> -----------------------------------------
>
>                 Key: AVRO-3257
>                 URL: https://issues.apache.org/jira/browse/AVRO-3257
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: java, spec
>            Reporter: Oscar Westra van Holthe - Kind
>            Assignee: Oscar Westra van Holthe - Kind
>            Priority: Minor
>              Labels: javacc, pull-request-available
>             Fix For: 1.11.1
>
>          Time Spent: 3h 50m
>  Remaining Estimate: 0h
>
> To define optional values, Avro has the "union with the null type" construction.
> In IDL, this is a rather verbose construct:
> {code}
> union {null, string} optionalName = null;
> {code}
> Wish: add Kotlin style optional types like this:
> {code}
> string? optionalName = null;
> {code}
> 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:
> {code}
> string? optionalName = "Jane Doe";
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)