Kriskras99 commented on code in PR #339:
URL: https://github.com/apache/avro-rs/pull/339#discussion_r2630889708


##########
avro/src/schema.rs:
##########
@@ -6713,14 +6792,38 @@ mod tests {
             "logicalType": "uuid"
         });
         let parse_result = Schema::parse(&schema)?;
-        assert_eq!(parse_result, Schema::Uuid);
+        assert_eq!(
+            parse_result,
+            Schema::Uuid(UuidSchema::Fixed(FixedSchema {
+                name: Name::new("FixedUUID")?,
+                aliases: None,
+                doc: None,
+                size: 16,
+                default: None,
+                attributes: Default::default(),
+            }))
+        );
         assert_not_logged(
             r#"Ignoring uuid logical type for a Fixed schema because its size 
(6) is not 16! Schema: Fixed(FixedSchema { name: Name { name: "FixedUUID", 
namespace: None }, aliases: None, doc: None, size: 6, attributes: 
{"logicalType": String("uuid")} })"#,
         );
 
         Ok(())
     }
 
+    #[test]
+    fn uuid_schema_bytes() -> TestResult {
+        let schema = json!(
+        {
+          "type": "bytes",
+          "name": "BytesUUID",
+          "logicalType": "uuid"
+        });
+        let parse_result = Schema::parse(&schema)?;
+        assert_eq!(parse_result, Schema::Uuid(UuidSchema::Bytes));
+
+        Ok(())
+    }
+

Review Comment:
   According to 
https://github.com/apache/avro-rs/blob/c0fef927bc97ee124d56aaa38bcb43421cad03c8/avro/src/schema.rs#L6725-L6751
   it should not error, but result in a `Schema::Fixed` and log a warning



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to