You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "Daniel Young (Jira)" <ji...@apache.org> on 2023/05/02 17:02:00 UTC
[jira] [Commented] (AVRO-3750) Python Optional UUIDs are not allowed
[ https://issues.apache.org/jira/browse/AVRO-3750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17718651#comment-17718651 ]
Daniel Young commented on AVRO-3750:
------------------------------------
I would like to fix this by adding an additional catch for TypeError here: [https://github.com/apache/avro/blob/master/lang/py/avro/schema.py#L1046]
> Python Optional UUIDs are not allowed
> -------------------------------------
>
> Key: AVRO-3750
> URL: https://issues.apache.org/jira/browse/AVRO-3750
> Project: Apache Avro
> Issue Type: Bug
> Components: python
> Affects Versions: 1.11.1
> Reporter: Daniel Young
> Priority: Major
>
> If a union type of null and logical type of uuid is used, Avro will try to decode the object as a UUID and create a TypeError exception, which is not caught.
> Example Schema:
> {code:java}
> {
> "name": "userId",
> "type": [
> "null",
> {
> "type": "string",
> "logicalType": "uuid"
> }
> ]
> }{code}
> if the example schema is given a userId of None then the application will stop with an uncaught exception.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)