[ https://issues.apache.org/jira/browse/AVRO-3970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17834188#comment-17834188 ]
Martin Tzvetanov Grigorov commented on AVRO-3970: ------------------------------------------------- Please send a Pull Request with your changes! If there are more missing logical types then they could be improved in more PRs! Thank you! > [Rust] incorrect compatibility checks with logicalType uuid > ----------------------------------------------------------- > > Key: AVRO-3970 > URL: https://issues.apache.org/jira/browse/AVRO-3970 > Project: Apache Avro > Issue Type: Bug > Components: rust > Reporter: mknaw > Priority: Minor > > A schema with a logicalType uuid field is incompatible with itself, per > `SchemaCompatibility`: > > {code:java} > use apache_avro::{Schema, schema_compatibility::SchemaCompatibility}; > fn main() { > let schema_str = r#"\{"type": "string", "logicalType": "uuid"}"#; > let writers_schema = Schema::parse_str(schema_str).unwrap(); > let readers_schema = Schema::parse_str(schema_str).unwrap(); > if let Err(err) = SchemaCompatibility::can_read(&writers_schema, > &readers_schema) { > eprintln!("Error: {}", err); > } > } > {code} > > this is the behavior on `main` as of writing (`876eae32`) and on the latest > version on crates.rs (`v0.16.0`) > I have a proposed fix here: > [https://github.com/apache/avro/compare/main...mknaw:avro:logical-type-compat-fix] > Perhaps there are other valid logicalTypes with this behavior. I have not > checked every logicalType yet. -- This message was sent by Atlassian Jira (v8.20.10#820010)