[
https://issues.apache.org/jira/browse/AVRO-4118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17925543#comment-17925543
]
Werner Daehn commented on AVRO-4118:
------------------------------------
I have no problem with ignoring unknown logical types, the problem is you
cannot - according to my understanding of the code - add new logical types.
Might be a feature request, but frankly, I would argue it is violating the Avro
standard. The spec says that logical types are a mean of adding new data types
and Avro supports a few out of the box. As it can be seen in all other
languages and in the fastavro Python library.
https://fastavro.readthedocs.io/en/latest/logical_types.html#custom-logical-types
> Custom logical types not supported in Python
> --------------------------------------------
>
> Key: AVRO-4118
> URL: https://issues.apache.org/jira/browse/AVRO-4118
> Project: Apache Avro
> Issue Type: Bug
> Components: logical types, python
> Affects Versions: 1.12.0
> Reporter: Werner Daehn
> Priority: Major
>
> Adding customer logical types in Java is no problem, but with Python I get a
> warning
> {code:java}
> avro\schema.py:1233: IgnoredLogicalType: Unknown VARCHAR, using string. {code}
> [https://github.com/apache/avro/blob/230414abbb68e63e68f3b55bfc0cbca94f2737f6/lang/py/avro/schema.py#L1233]
> Looking at above code, there is no extension mechanism, as it seems.
>
> Example field:
> {code:java}
> {
> "name" : "__change_type",
> "type" : [ "null", {
> "type" : "string",
> "logicalType" : "VARCHAR",
> "length" : 1
> } ],
> "default" : null
> } {code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)