martin-g commented on issue #476: URL: https://github.com/apache/avro-rs/issues/476#issuecomment-3943071557
Here are some IT tests in the Java SDK which also use the flatten layout: * https://github.com/apache/avro/blob/999b36feadf76ff9eb7535a66a00dbffba8b0b75/lang/java/integration-test/codegen-test/src/test/resources/avro/nested_logical_types_union_fixed.avsc * https://github.com/apache/avro/blob/999b36feadf76ff9eb7535a66a00dbffba8b0b75/lang/java/integration-test/codegen-test/src/test/resources/avro/custom_conversion_logical_types_enum.avsc Here is a simple Java app that confirms that it supports the flatten way: 1. pom.xml ```xml <dependency> <groupId>org.apache.avro</groupId> <artifactId>avro</artifactId> <version>1.12.1</version> </dependency> ``` 2. Java ```java import org.apache.avro.Schema; import org.apache.avro.SchemaParser; public class App { public static final String SCHEMA = """ { "namespace": "org.apache.avro.codegentest.testdata", "name": "customEnum", "type": "enum", "logicalType": "custom-enum", "symbols": ["ONE", "TWO", "THREE"] } """; void main(String[] args) { Schema schema = new SchemaParser() .parse(SCHEMA) .mainSchema(); System.out.println(schema); } } ``` 3. Output ``` {"type":"enum","name":"customEnum","namespace":"org.apache.avro.codegentest.testdata","symbols":["ONE","TWO","THREE"],"logicalType":"custom-enum"} ``` I cannot tell what avro-tools.jar does differently than SchemaParser. -- 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]
