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

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

Commit 61df187141081c47d7cbdb304644ebf426695bf4 in avro's branch 
refs/heads/dependabot/maven/lang/java/org.codehaus.plexus-plexus-utils-4.0.0 
from Martin Grigorov
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=61df18714 ]

AVRO-3900: [Rust] Make it possible to use custom names validators (#2643)

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

* AVRO-3900: Add validator trait for enum symbol names

* AVRO-3900: Introduce validator for RecordField's name

* AVRO-3900: Extract the custom validators tests as IT tests

This way they use the public APIs of the crate, as a real user application.

* AVRO-3900: Polish APIs

* AVRO-3900: Split the validator integration tests

Otherwise there are timing issues with the initializations of the
OnceLock's for the different validators.
Parsing a Schema leads to initialization of the default validator and
later it is impossible to set a custom one

* AVRO-3900: Simplify generate_interop_data.rs example to not use 
avro_test_helper crate

For some reason clearing the log messages in the tests destructor
(#[dtor]) was failing for this example.

Simplify the TestLogger to use the std thread_local!() instead of the
third party ref_thread_local!()

* AVRO-3900: Merge the validators integration tests in one test

Just make sure the setup of the custom validators is done before the
parsing of any schema to prevent registering the default validator
(SpecificationValidator)

* AVRO-3900: Improve the documentation

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

> 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
>            Assignee: Martin Tzvetanov Grigorov
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.12.0, 1.11.4
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> 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)

Reply via email to