martin-g commented on PR #260:
URL: https://github.com/apache/avro-rs/pull/260#issuecomment-3178895167
Right!
```diff
git diff
diff --git i/avro/src/schema_equality.rs w/avro/src/schema_equality.rs
index 1097594..83bf969 100644
--- i/avro/src/schema_equality.rs
+++ w/avro/src/schema_equality.rs
@@ -217,7 +217,9 @@ impl StructFieldEq {
&& fields_one
.iter()
.zip(fields_two.iter())
- .all(|(f1, f2)| self.compare(&f1.schema, &f2.schema))
+ .all(|(f1, f2)| {
+ self.compare(&f1.schema, &f2.schema) && f1.default ==
f2.default
+ })
}
}
diff --git i/avro_derive/tests/derive.rs w/avro_derive/tests/derive.rs
index a85caa0..aea426f 100644
--- i/avro_derive/tests/derive.rs
+++ w/avro_derive/tests/derive.rs
@@ -1449,7 +1449,7 @@ mod test_derive {
{
"name":"optional",
"type": ["null", "string"],
- "default": null
+ "default": "null"
}
]
```
detects the issue!
But I am not sure whether it this should be done!
Hopefully someone will explain why the `default` should be `STRIP`ed for
canonical form at
https://lists.apache.org/thread/j0no5h8sjlyo1xdzw47dftgcn2k84w2h
--
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]