You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Carlos Teixeira (Jira)" <ji...@apache.org> on 2021/02/15 17:07:00 UTC
[jira] [Created] (AVRO-3045) Wrong Validation in Python Avro
Implementation
Carlos Teixeira created AVRO-3045:
-------------------------------------
Summary: Wrong Validation in Python Avro Implementation
Key: AVRO-3045
URL: https://issues.apache.org/jira/browse/AVRO-3045
Project: Apache Avro
Issue Type: Bug
Reporter: Carlos Teixeira
Hi,
This has been raised by my colleague Adamos (cc @adamosloizou)
Seems like in the python implementation of Avro there is a [check|https://github.com/apache/avro/blob/master/lang/py3/avro/schema.py#L399] that verifies that a schema name is not part of *VALID_TYPES* which include the following:
{code:java}
VALID_TYPES = frozenset.union(
PRIMITIVE_TYPES,
NAMED_TYPES,
[
ARRAY,
MAP,
UNION,
REQUEST,
ERROR_UNION,
],
)
{code}
This check means that a type names can't be "record" or "array". This however is not spec compliant since the spec says that names need only to :
* start with [A-Za-z_]
* subsequently contain only [A-Za-z0-9_]
* Primitive type names have no namespace and their names may not be defined in any namespace.
As such, and since "record" and "array" are not primitive types their usage shouldn't result in an error.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)