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 d63ad1fff70e01bc754332c48c390b5fc2b36594
Author: Rik Heijdens <[email protected]>
AuthorDate: Fri Jul 28 13:57:01 2023 +0200

    AVRO-3786: Revert change to UnionSchema::find_schema_with_known_schemata
---
 lang/rust/avro/src/schema.rs | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/lang/rust/avro/src/schema.rs b/lang/rust/avro/src/schema.rs
index 8ca6bc996..22307d4e4 100644
--- a/lang/rust/avro/src/schema.rs
+++ b/lang/rust/avro/src/schema.rs
@@ -839,13 +839,9 @@ impl UnionSchema {
                 let namespace = &schema.namespace().or_else(|| 
enclosing_namespace.clone());
 
                 // Attempt to validate the value in order to ensure we've 
selected the right schema.
-                match value.validate_internal(schema, &collected_names, 
namespace, true) {
-                    None => true,
-                    Some(err) => {
-                        println!("Validation failed: {:?}", err);
-                        false
-                    }
-                }
+                value
+                    .validate_internal(schema, &collected_names, namespace, 
true)
+                    .is_none()
             })
         }
     }

Reply via email to