You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2023/12/20 14:15:00 UTC

[jira] [Commented] (AVRO-3900) Permissiveness in schema namespaces for rust SDK?

    [ https://issues.apache.org/jira/browse/AVRO-3900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17799030#comment-17799030 ] 

ASF subversion and git services commented on AVRO-3900:
-------------------------------------------------------

Commit 5b9df53e941369513a2507a47e5faf6f7f8f6574 in avro's branch refs/heads/avro-3900-custom-name-validators from Martin Tzvetanov Grigorov
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=5b9df53e9 ]

AVRO-3900: [Rust] Make it possible to use custom validators

WIP

TODO:
- Extract validators for enum symbols and record field names
- Polish the APIs

Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>


> Permissiveness in schema namespaces for rust SDK?
> -------------------------------------------------
>
>                 Key: AVRO-3900
>                 URL: https://issues.apache.org/jira/browse/AVRO-3900
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: rust
>    Affects Versions: 1.11.3
>            Reporter: Jon Slusher
>            Priority: Major
>
> We have an Avro schema registry that has schema with hyphens in some of the namespaces. These schema were created by our Debezium connectors. We have Python consumers that are able to use them without an issue, but we're trying to write a consumer in Rust and it appears that the Avro SDK for rust doesn't support this permissiveness.
>  
> Here's an example of one of the schema created by our Debezium connectors: 
>  
> {code:java}
> {
>   "type": "record",
>   "name": "Envelope",
>   "namespace": "debezium.example-connector-20231005.database.my_table",
>   "fields": [
>     {
>       "name": "before",
>       "type": [
>         "null",
>         {
>           "type": "record",
>           "name": "Value",
>           "fields": [
>             {
>               "name": "id",
>               "type": "int"
>             },
>             {
>               "name": "uid",
>               "type": {
>                 "type": "long",
>                 "connect.default": 0
>               },
>               "default": 0
>             },
> ...
> {code}
>  
> If that schema is allowed in our Avro Schema Registry I would think that it should be allowed by any consumer trying to use it. 
>  
> I opened an [issue in the rust schema converter crate's repository|[https://github.com/gklijs/schema_registry_converter/issues/100]], and it appears that the problem is in the Avro SDK. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)