[
https://issues.apache.org/jira/browse/AVRO-3644?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated AVRO-3644:
---------------------------------
Labels: pull-request-available (was: )
> [JAVA] Support java.util.Optional in reflect package
> ----------------------------------------------------
>
> Key: AVRO-3644
> URL: https://issues.apache.org/jira/browse/AVRO-3644
> Project: Apache Avro
> Issue Type: Improvement
> Components: java
> Reporter: Daniel Heinrich
> Priority: Trivial
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> java.util.Optional can currently not be used at all when using reflection
> based schemas.
> _org.apache.avro.reflect.ReflectData#getSchema_ will currently produce the
> following type for fields using Optional:
> {"type":"record","name":"Optional","namespace":"java.util","fields":[]}
> The generated schema is completly unusable (it does not contain any data). I
> would like to propose to map Optional fields as if they were not using
> Optional and would be annotated with @Nullable. So resulting in the following
> type:
> ["null","something"]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)