You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Ryan Skraba (Jira)" <ji...@apache.org> on 2022/03/18 19:21:00 UTC
[jira] [Resolved] (AVRO-3441) Automatically register LogicalTypeFactory classes
[ https://issues.apache.org/jira/browse/AVRO-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ryan Skraba resolved AVRO-3441.
-------------------------------
Resolution: Fixed
Cherry-picked to [branch-1.11|https://github.com/apache/avro/commit/7497d55d785818e7e1956d98d390c2ccdb3e8ef7]. Thanks for your contribution!
> Automatically register LogicalTypeFactory classes
> -------------------------------------------------
>
> Key: AVRO-3441
> URL: https://issues.apache.org/jira/browse/AVRO-3441
> Project: Apache Avro
> Issue Type: Improvement
> Components: java, logical types
> Affects Versions: 1.11.0
> Reporter: Oscar Westra van Holthe - Kind
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.11.1
>
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> Manually registering a {{LogicalTypeFactory}} is cumbersome, but necessary if creating the factory requires constructor parameters.
> For most cases though, a {{LogicalTypeFactory}} gets all the information it needs from the schema. This makes it a good candidate for a SPI (using the Java 6 {{ServiceLoader}} class). The PR demonstrates that this is quite easy, because the interface already supports registering a {{LogicalTypeFactory}} without any additional information.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)