This is an automated email from the ASF dual-hosted git repository. mgrigorov pushed a commit to branch avro-3814/schema-resolution-union in repository https://gitbox.apache.org/repos/asf/avro.git
commit 622a1c3593be9d65c1921b5d8472cda0381ba82e Author: Rik Heijdens <[email protected]> AuthorDate: Fri Jul 28 11:23:12 2023 +0200 AVRO-3814: Ensure to validate the deserialized value against the schema --- lang/rust/avro/src/schema.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/lang/rust/avro/src/schema.rs b/lang/rust/avro/src/schema.rs index e586d05f5..f44161d7b 100644 --- a/lang/rust/avro/src/schema.rs +++ b/lang/rust/avro/src/schema.rs @@ -5328,6 +5328,7 @@ mod tests { // Deserialization should succeed and we should be able to resolve the schema. let deser_value = crate::from_avro_datum(&writer_schema, &mut x, Some(&reader_schema))?; + assert!(deser_value.validate(&reader_schema)); // Verify that we can read a field from the record. let d: MyRecordReader = crate::from_value(&deser_value)?;
