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


##########
avro/src/serde/ser_schema.rs:
##########
@@ -783,6 +785,40 @@ impl<'s, W: Write> SchemaAwareWriteSerializer<'s, W> {
             expected => Err(create_error(format!("Expected: {expected}. Got: 
Int/Long"))),
         }
     }
+    fn serialize_i128_with_schema(&mut self, value: i128, schema: &Schema) -> 
Result<usize, Error> {
+        let create_error = |cause: String| {
+            Error::new(Details::SerializeValueWithSchema {
+                value_type: "i128",
+                value: format!("{value}. Cause: {cause}"),
+                schema: schema.clone(),
+            })
+        };
+
+        match schema {
+            Schema::Fixed(fixed) if fixed.size == 16 && fixed.name.name == 
"i128" => {

Review Comment:
   The field can be named whatever the user wants. This only checks the name of 
the Schema itself.



-- 
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