You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "Oscar Westra van Holthe - Kind (Jira)" <ji...@apache.org> on 2025/06/27 21:36:00 UTC
[jira] [Resolved] (AVRO-4159) [Java] Duration support is incomplete
[ https://issues.apache.org/jira/browse/AVRO-4159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oscar Westra van Holthe - Kind resolved AVRO-4159.
--------------------------------------------------
Resolution: Fixed
> [Java] Duration support is incomplete
> -------------------------------------
>
> Key: AVRO-4159
> URL: https://issues.apache.org/jira/browse/AVRO-4159
> Project: Apache Avro
> Issue Type: Bug
> Components: java, logical types
> Affects Versions: 1.12.0
> Reporter: Georg Friedrich
> Priority: Major
> Fix For: 1.13.0
>
>
> The PR of [https://github.com/apache/avro/pull/2520] added support of the logical type `duration` to the Java library.
> Unfortunately it was missed to add the parsing of this new logical type for a schema to the switch-case statement at [https://github.com/apache/avro/blob/029e76fecb1ed73a0cbb08bfcedcf8135f492a6e/lang/java/avro/src/main/java/org/apache/avro/LogicalTypes.java#L133]
> Due to this it is currently impossible to read the schema using a `duration` as logical type.
> Workaround:
> One may add a type factory registration which returns the Duration instance.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)