Closed timmyb32r closed 2 weeks ago
Hi. Thanks for bringing this up. You can confirm all checks pass with this one change?
Out of interest, how are you running the compatibility tests?
Out of interest, how are you running the compatibility tests?
I've took java apache/avro compatibility tests, made from them testcases for golang, and run them. Some part was easy to rewrite by hands, some part by regexps. Of course, I couldn't make full-fledged transpilation - i've had only several days, so hand-rewrite + regexps: made the deal.
Actually, I have now golang tool who take TestSchemaCompatibility.java & TestSchemas.java - and generates golang tests from them. But result code look ugly, so I didn't think somebody will be interested in that (I've just put it into my CI for myself). But if you are interested in that tests generator - I can share it.
You can confirm all checks pass with this one change?
yeah, if this check improve - then from java project apache/avro passed next tests:
Java implementation of apache/avro has a lot of tests on compatibility function, and hamba/avro differs with only one test (other tests are passed). The problem case is - when reader_schema & writer_schema differs by only namespace.
links:
https://github.com/apache/avro/blob/main/lang/java/avro/src/test/java/org/apache/avro/TestSchemas.java#L119
https://github.com/apache/avro/blob/main/lang/java/avro/src/test/java/org/apache/avro/TestSchemaCompatibility.java#L341
https://github.com/apache/avro/blob/main/lang/java/avro/src/test/java/org/apache/avro/TestSchemaCompatibility.java#L389 - test
Where the difference is
into java implementation there are comparison with GetName(): https://github.com/apache/avro/blob/main/lang/java/avro/src/test/java/org/apache/avro/TestSchemaCompatibility.java#L389
into hamba/avro there are comparison with GetFullName(): https://github.com/hamba/avro/blob/main/schema_compatibility.go#L182
Let's make these checks equal!