You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by GitBox <gi...@apache.org> on 2022/06/15 12:54:06 UTC

[GitHub] [avro] im-pratham opened a new pull request, #1721: AVRO-3536: Inherit conversions for Union type

im-pratham opened a new pull request, #1721:
URL: https://github.com/apache/avro/pull/1721

   Updated the getForSchema to also consider Union types


-- 
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: dev-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [avro] im-pratham commented on a diff in pull request #1721: AVRO-3536: Inherit conversions for Union type

Posted by GitBox <gi...@apache.org>.
im-pratham commented on code in PR #1721:
URL: https://github.com/apache/avro/pull/1721#discussion_r921124530


##########
lang/java/avro/src/test/java/org/apache/avro/specific/TestUnionRecord.java:
##########
@@ -0,0 +1,306 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+package org.apache.avro.specific;
+
+import org.apache.avro.message.BinaryMessageDecoder;
+import org.apache.avro.message.BinaryMessageEncoder;
+import org.apache.avro.message.SchemaStore;
+
+@AvroGenerated
+public class TestUnionRecord extends SpecificRecordBase implements SpecificRecord {
+  private static final long serialVersionUID = -3829374192747523457L;
+
+  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse(
+      "{\"type\":\"record\",\"name\":\"TestUnionRecord\",\"namespace\":\"org.apache.avro.specific\",\"fields\":[{\"name\":\"amount\",\"type\":[\"null\",{\"type\":\"bytes\",\"logicalType\":\"decimal\",\"precision\":31,\"scale\":8}],\"default\":null}]}");
+
+  public static org.apache.avro.Schema getClassSchema() {
+    return SCHEMA$;
+  }
+
+  private static final SpecificData MODEL$ = new SpecificData();
+  static {
+    MODEL$.addLogicalTypeConversion(new org.apache.avro.Conversions.DecimalConversion());
+  }
+
+  private static final BinaryMessageEncoder<TestUnionRecord> ENCODER = new BinaryMessageEncoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  private static final BinaryMessageDecoder<TestUnionRecord> DECODER = new BinaryMessageDecoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  /**
+   * Return the BinaryMessageEncoder instance used by this class.
+   * 
+   * @return the message encoder used by this class
+   */
+  public static BinaryMessageEncoder<TestUnionRecord> getEncoder() {
+    return ENCODER;
+  }
+
+  /**
+   * Return the BinaryMessageDecoder instance used by this class.
+   * 
+   * @return the message decoder used by this class
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> getDecoder() {
+    return DECODER;
+  }
+
+  /**
+   * Create a new BinaryMessageDecoder instance for this class that uses the
+   * specified {@link SchemaStore}.
+   * 
+   * @param resolver a {@link SchemaStore} used to find schemas by fingerprint
+   * @return a BinaryMessageDecoder instance for this class backed by the given
+   *         SchemaStore
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> createDecoder(SchemaStore resolver) {
+    return new BinaryMessageDecoder<TestUnionRecord>(MODEL$, SCHEMA$, resolver);
+  }
+
+  /**
+   * Serializes this TestUnionRecord to a ByteBuffer.
+   * 
+   * @return a buffer holding the serialized data for this instance
+   * @throws java.io.IOException if this instance could not be serialized
+   */
+  public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
+    return ENCODER.encode(this);
+  }
+
+  /**
+   * Deserializes a TestUnionRecord from a ByteBuffer.
+   * 
+   * @param b a byte buffer holding serialized data for an instance of this class
+   * @return a TestUnionRecord instance decoded from the given buffer
+   * @throws java.io.IOException if the given bytes could not be deserialized into
+   *                             an instance of this class
+   */
+  public static TestUnionRecord fromByteBuffer(java.nio.ByteBuffer b) throws java.io.IOException {
+    return DECODER.decode(b);
+  }
+
+  private java.math.BigDecimal amount;
+
+  /**
+   * Default constructor. Note that this does not initialize fields to their
+   * default values from the schema. If that is desired then one should use
+   * <code>newBuilder()</code>.
+   */
+  public TestUnionRecord() {
+  }
+
+  /**
+   * All-args constructor.
+   * 
+   * @param amount The new value for amount
+   */
+  public TestUnionRecord(java.math.BigDecimal amount) {
+    this.amount = amount;
+  }
+
+  public SpecificData getSpecificData() {

Review Comment:
   @KalleOlaviNiemitalo pushed newly generated class file, which has the `@Override` annotation



-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [avro] MosheElisha commented on pull request #1721: AVRO-3536: Inherit conversions for Union type

Posted by GitBox <gi...@apache.org>.
MosheElisha commented on PR #1721:
URL: https://github.com/apache/avro/pull/1721#issuecomment-1353532537

   Thanks for the fix! When can we expect a release (avro and avro-maven-plugin) with the fix?


-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [avro] KalleOlaviNiemitalo commented on a diff in pull request #1721: AVRO-3536: Inherit conversions for Union type

Posted by GitBox <gi...@apache.org>.
KalleOlaviNiemitalo commented on code in PR #1721:
URL: https://github.com/apache/avro/pull/1721#discussion_r910948234


##########
lang/java/avro/src/test/java/org/apache/avro/specific/TestUnionRecord.java:
##########
@@ -0,0 +1,306 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+package org.apache.avro.specific;
+
+import org.apache.avro.message.BinaryMessageDecoder;
+import org.apache.avro.message.BinaryMessageEncoder;
+import org.apache.avro.message.SchemaStore;
+
+@AvroGenerated
+public class TestUnionRecord extends SpecificRecordBase implements SpecificRecord {
+  private static final long serialVersionUID = -3829374192747523457L;
+
+  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse(
+      "{\"type\":\"record\",\"name\":\"TestUnionRecord\",\"namespace\":\"org.apache.avro.specific\",\"fields\":[{\"name\":\"amount\",\"type\":[\"null\",{\"type\":\"bytes\",\"logicalType\":\"decimal\",\"precision\":31,\"scale\":8}],\"default\":null}]}");
+
+  public static org.apache.avro.Schema getClassSchema() {
+    return SCHEMA$;
+  }
+
+  private static final SpecificData MODEL$ = new SpecificData();
+  static {
+    MODEL$.addLogicalTypeConversion(new org.apache.avro.Conversions.DecimalConversion());
+  }
+
+  private static final BinaryMessageEncoder<TestUnionRecord> ENCODER = new BinaryMessageEncoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  private static final BinaryMessageDecoder<TestUnionRecord> DECODER = new BinaryMessageDecoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  /**
+   * Return the BinaryMessageEncoder instance used by this class.
+   * 
+   * @return the message encoder used by this class
+   */
+  public static BinaryMessageEncoder<TestUnionRecord> getEncoder() {
+    return ENCODER;
+  }
+
+  /**
+   * Return the BinaryMessageDecoder instance used by this class.
+   * 
+   * @return the message decoder used by this class
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> getDecoder() {
+    return DECODER;
+  }
+
+  /**
+   * Create a new BinaryMessageDecoder instance for this class that uses the
+   * specified {@link SchemaStore}.
+   * 
+   * @param resolver a {@link SchemaStore} used to find schemas by fingerprint
+   * @return a BinaryMessageDecoder instance for this class backed by the given
+   *         SchemaStore
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> createDecoder(SchemaStore resolver) {
+    return new BinaryMessageDecoder<TestUnionRecord>(MODEL$, SCHEMA$, resolver);
+  }
+
+  /**
+   * Serializes this TestUnionRecord to a ByteBuffer.
+   * 
+   * @return a buffer holding the serialized data for this instance
+   * @throws java.io.IOException if this instance could not be serialized
+   */
+  public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
+    return ENCODER.encode(this);
+  }
+
+  /**
+   * Deserializes a TestUnionRecord from a ByteBuffer.
+   * 
+   * @param b a byte buffer holding serialized data for an instance of this class
+   * @return a TestUnionRecord instance decoded from the given buffer
+   * @throws java.io.IOException if the given bytes could not be deserialized into
+   *                             an instance of this class
+   */
+  public static TestUnionRecord fromByteBuffer(java.nio.ByteBuffer b) throws java.io.IOException {
+    return DECODER.decode(b);
+  }
+
+  private java.math.BigDecimal amount;
+
+  /**
+   * Default constructor. Note that this does not initialize fields to their
+   * default values from the schema. If that is desired then one should use
+   * <code>newBuilder()</code>.
+   */
+  public TestUnionRecord() {
+  }
+
+  /**
+   * All-args constructor.
+   * 
+   * @param amount The new value for amount
+   */
+  public TestUnionRecord(java.math.BigDecimal amount) {
+    this.amount = amount;
+  }
+
+  public SpecificData getSpecificData() {

Review Comment:
   There is a feature request https://issues.apache.org/jira/browse/AVRO-2774 for making the code generator add the Override annotations. So no need to file a new one for that.



-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [avro] im-pratham commented on a diff in pull request #1721: AVRO-3536: Inherit conversions for Union type

Posted by GitBox <gi...@apache.org>.
im-pratham commented on code in PR #1721:
URL: https://github.com/apache/avro/pull/1721#discussion_r910971075


##########
lang/java/avro/src/test/java/org/apache/avro/specific/TestUnionRecord.java:
##########
@@ -0,0 +1,306 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+package org.apache.avro.specific;
+
+import org.apache.avro.message.BinaryMessageDecoder;
+import org.apache.avro.message.BinaryMessageEncoder;
+import org.apache.avro.message.SchemaStore;
+
+@AvroGenerated
+public class TestUnionRecord extends SpecificRecordBase implements SpecificRecord {
+  private static final long serialVersionUID = -3829374192747523457L;
+
+  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse(
+      "{\"type\":\"record\",\"name\":\"TestUnionRecord\",\"namespace\":\"org.apache.avro.specific\",\"fields\":[{\"name\":\"amount\",\"type\":[\"null\",{\"type\":\"bytes\",\"logicalType\":\"decimal\",\"precision\":31,\"scale\":8}],\"default\":null}]}");
+
+  public static org.apache.avro.Schema getClassSchema() {
+    return SCHEMA$;
+  }
+
+  private static final SpecificData MODEL$ = new SpecificData();
+  static {
+    MODEL$.addLogicalTypeConversion(new org.apache.avro.Conversions.DecimalConversion());
+  }
+
+  private static final BinaryMessageEncoder<TestUnionRecord> ENCODER = new BinaryMessageEncoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  private static final BinaryMessageDecoder<TestUnionRecord> DECODER = new BinaryMessageDecoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  /**
+   * Return the BinaryMessageEncoder instance used by this class.
+   * 
+   * @return the message encoder used by this class
+   */
+  public static BinaryMessageEncoder<TestUnionRecord> getEncoder() {
+    return ENCODER;
+  }
+
+  /**
+   * Return the BinaryMessageDecoder instance used by this class.
+   * 
+   * @return the message decoder used by this class
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> getDecoder() {
+    return DECODER;
+  }
+
+  /**
+   * Create a new BinaryMessageDecoder instance for this class that uses the
+   * specified {@link SchemaStore}.
+   * 
+   * @param resolver a {@link SchemaStore} used to find schemas by fingerprint
+   * @return a BinaryMessageDecoder instance for this class backed by the given
+   *         SchemaStore
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> createDecoder(SchemaStore resolver) {
+    return new BinaryMessageDecoder<TestUnionRecord>(MODEL$, SCHEMA$, resolver);
+  }
+
+  /**
+   * Serializes this TestUnionRecord to a ByteBuffer.
+   * 
+   * @return a buffer holding the serialized data for this instance
+   * @throws java.io.IOException if this instance could not be serialized
+   */
+  public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
+    return ENCODER.encode(this);
+  }
+
+  /**
+   * Deserializes a TestUnionRecord from a ByteBuffer.
+   * 
+   * @param b a byte buffer holding serialized data for an instance of this class
+   * @return a TestUnionRecord instance decoded from the given buffer
+   * @throws java.io.IOException if the given bytes could not be deserialized into
+   *                             an instance of this class
+   */
+  public static TestUnionRecord fromByteBuffer(java.nio.ByteBuffer b) throws java.io.IOException {
+    return DECODER.decode(b);
+  }
+
+  private java.math.BigDecimal amount;
+
+  /**
+   * Default constructor. Note that this does not initialize fields to their
+   * default values from the schema. If that is desired then one should use
+   * <code>newBuilder()</code>.
+   */
+  public TestUnionRecord() {
+  }
+
+  /**
+   * All-args constructor.
+   * 
+   * @param amount The new value for amount
+   */
+  public TestUnionRecord(java.math.BigDecimal amount) {
+    this.amount = amount;
+  }
+
+  public SpecificData getSpecificData() {

Review Comment:
   Hi @KalleOlaviNiemitalo added the latest commit for fixing test failure issue. Do you want me to remove this `@Suppress` annotation? 
   Also the main PR is for fixing type conversion.



-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [avro] github-code-scanning[bot] commented on a diff in pull request #1721: AVRO-3536: Inherit conversions for Union type

Posted by GitBox <gi...@apache.org>.
github-code-scanning[bot] commented on code in PR #1721:
URL: https://github.com/apache/avro/pull/1721#discussion_r901671858


##########
lang/java/avro/src/test/java/org/apache/avro/specific/TestUnionRecord.java:
##########
@@ -0,0 +1,306 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+package org.apache.avro.specific;
+
+import org.apache.avro.message.BinaryMessageDecoder;
+import org.apache.avro.message.BinaryMessageEncoder;
+import org.apache.avro.message.SchemaStore;
+
+@AvroGenerated
+public class TestUnionRecord extends SpecificRecordBase implements SpecificRecord {
+  private static final long serialVersionUID = -3829374192747523457L;
+
+  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse(
+      "{\"type\":\"record\",\"name\":\"TestUnionRecord\",\"namespace\":\"org.apache.avro.specific\",\"fields\":[{\"name\":\"amount\",\"type\":[\"null\",{\"type\":\"bytes\",\"logicalType\":\"decimal\",\"precision\":31,\"scale\":8}],\"default\":null}]}");
+
+  public static org.apache.avro.Schema getClassSchema() {
+    return SCHEMA$;
+  }
+
+  private static final SpecificData MODEL$ = new SpecificData();
+  static {
+    MODEL$.addLogicalTypeConversion(new org.apache.avro.Conversions.DecimalConversion());
+  }
+
+  private static final BinaryMessageEncoder<TestUnionRecord> ENCODER = new BinaryMessageEncoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  private static final BinaryMessageDecoder<TestUnionRecord> DECODER = new BinaryMessageDecoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  /**
+   * Return the BinaryMessageEncoder instance used by this class.
+   * 
+   * @return the message encoder used by this class
+   */
+  public static BinaryMessageEncoder<TestUnionRecord> getEncoder() {
+    return ENCODER;
+  }
+
+  /**
+   * Return the BinaryMessageDecoder instance used by this class.
+   * 
+   * @return the message decoder used by this class
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> getDecoder() {
+    return DECODER;
+  }
+
+  /**
+   * Create a new BinaryMessageDecoder instance for this class that uses the
+   * specified {@link SchemaStore}.
+   * 
+   * @param resolver a {@link SchemaStore} used to find schemas by fingerprint
+   * @return a BinaryMessageDecoder instance for this class backed by the given
+   *         SchemaStore
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> createDecoder(SchemaStore resolver) {
+    return new BinaryMessageDecoder<TestUnionRecord>(MODEL$, SCHEMA$, resolver);
+  }
+
+  /**
+   * Serializes this TestUnionRecord to a ByteBuffer.
+   * 
+   * @return a buffer holding the serialized data for this instance
+   * @throws java.io.IOException if this instance could not be serialized
+   */
+  public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
+    return ENCODER.encode(this);
+  }
+
+  /**
+   * Deserializes a TestUnionRecord from a ByteBuffer.
+   * 
+   * @param b a byte buffer holding serialized data for an instance of this class
+   * @return a TestUnionRecord instance decoded from the given buffer
+   * @throws java.io.IOException if the given bytes could not be deserialized into
+   *                             an instance of this class
+   */
+  public static TestUnionRecord fromByteBuffer(java.nio.ByteBuffer b) throws java.io.IOException {
+    return DECODER.decode(b);
+  }
+
+  private java.math.BigDecimal amount;
+
+  /**
+   * Default constructor. Note that this does not initialize fields to their
+   * default values from the schema. If that is desired then one should use
+   * <code>newBuilder()</code>.
+   */
+  public TestUnionRecord() {
+  }
+
+  /**
+   * All-args constructor.
+   * 
+   * @param amount The new value for amount
+   */
+  public TestUnionRecord(java.math.BigDecimal amount) {
+    this.amount = amount;
+  }
+
+  public SpecificData getSpecificData() {
+    return MODEL$;
+  }
+
+  public org.apache.avro.Schema getSchema() {
+    return SCHEMA$;
+  }
+
+  // Used by DatumWriter. Applications should not call.
+  public Object get(int field$) {

Review Comment:
   ## Missing Override annotation
   
   This method overrides [IndexedRecord.get](1); it is advisable to add an Override annotation.
   
   [Show more details](https://github.com/apache/avro/security/code-scanning/2720)



##########
lang/java/avro/src/test/java/org/apache/avro/specific/TestUnionRecord.java:
##########
@@ -0,0 +1,306 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+package org.apache.avro.specific;
+
+import org.apache.avro.message.BinaryMessageDecoder;
+import org.apache.avro.message.BinaryMessageEncoder;
+import org.apache.avro.message.SchemaStore;
+
+@AvroGenerated
+public class TestUnionRecord extends SpecificRecordBase implements SpecificRecord {
+  private static final long serialVersionUID = -3829374192747523457L;
+
+  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse(
+      "{\"type\":\"record\",\"name\":\"TestUnionRecord\",\"namespace\":\"org.apache.avro.specific\",\"fields\":[{\"name\":\"amount\",\"type\":[\"null\",{\"type\":\"bytes\",\"logicalType\":\"decimal\",\"precision\":31,\"scale\":8}],\"default\":null}]}");
+
+  public static org.apache.avro.Schema getClassSchema() {
+    return SCHEMA$;
+  }
+
+  private static final SpecificData MODEL$ = new SpecificData();
+  static {
+    MODEL$.addLogicalTypeConversion(new org.apache.avro.Conversions.DecimalConversion());
+  }
+
+  private static final BinaryMessageEncoder<TestUnionRecord> ENCODER = new BinaryMessageEncoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  private static final BinaryMessageDecoder<TestUnionRecord> DECODER = new BinaryMessageDecoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  /**
+   * Return the BinaryMessageEncoder instance used by this class.
+   * 
+   * @return the message encoder used by this class
+   */
+  public static BinaryMessageEncoder<TestUnionRecord> getEncoder() {
+    return ENCODER;
+  }
+
+  /**
+   * Return the BinaryMessageDecoder instance used by this class.
+   * 
+   * @return the message decoder used by this class
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> getDecoder() {
+    return DECODER;
+  }
+
+  /**
+   * Create a new BinaryMessageDecoder instance for this class that uses the
+   * specified {@link SchemaStore}.
+   * 
+   * @param resolver a {@link SchemaStore} used to find schemas by fingerprint
+   * @return a BinaryMessageDecoder instance for this class backed by the given
+   *         SchemaStore
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> createDecoder(SchemaStore resolver) {
+    return new BinaryMessageDecoder<TestUnionRecord>(MODEL$, SCHEMA$, resolver);
+  }
+
+  /**
+   * Serializes this TestUnionRecord to a ByteBuffer.
+   * 
+   * @return a buffer holding the serialized data for this instance
+   * @throws java.io.IOException if this instance could not be serialized
+   */
+  public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
+    return ENCODER.encode(this);
+  }
+
+  /**
+   * Deserializes a TestUnionRecord from a ByteBuffer.
+   * 
+   * @param b a byte buffer holding serialized data for an instance of this class
+   * @return a TestUnionRecord instance decoded from the given buffer
+   * @throws java.io.IOException if the given bytes could not be deserialized into
+   *                             an instance of this class
+   */
+  public static TestUnionRecord fromByteBuffer(java.nio.ByteBuffer b) throws java.io.IOException {
+    return DECODER.decode(b);
+  }
+
+  private java.math.BigDecimal amount;
+
+  /**
+   * Default constructor. Note that this does not initialize fields to their
+   * default values from the schema. If that is desired then one should use
+   * <code>newBuilder()</code>.
+   */
+  public TestUnionRecord() {
+  }
+
+  /**
+   * All-args constructor.
+   * 
+   * @param amount The new value for amount
+   */
+  public TestUnionRecord(java.math.BigDecimal amount) {
+    this.amount = amount;
+  }
+
+  public SpecificData getSpecificData() {

Review Comment:
   ## Missing Override annotation
   
   This method overrides [SpecificRecordBase.getSpecificData](1); it is advisable to add an Override annotation.
   
   [Show more details](https://github.com/apache/avro/security/code-scanning/2722)



##########
lang/java/avro/src/test/java/org/apache/avro/specific/TestUnionRecord.java:
##########
@@ -0,0 +1,306 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+package org.apache.avro.specific;
+
+import org.apache.avro.message.BinaryMessageDecoder;
+import org.apache.avro.message.BinaryMessageEncoder;
+import org.apache.avro.message.SchemaStore;
+
+@AvroGenerated
+public class TestUnionRecord extends SpecificRecordBase implements SpecificRecord {
+  private static final long serialVersionUID = -3829374192747523457L;
+
+  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse(
+      "{\"type\":\"record\",\"name\":\"TestUnionRecord\",\"namespace\":\"org.apache.avro.specific\",\"fields\":[{\"name\":\"amount\",\"type\":[\"null\",{\"type\":\"bytes\",\"logicalType\":\"decimal\",\"precision\":31,\"scale\":8}],\"default\":null}]}");
+
+  public static org.apache.avro.Schema getClassSchema() {
+    return SCHEMA$;
+  }
+
+  private static final SpecificData MODEL$ = new SpecificData();
+  static {
+    MODEL$.addLogicalTypeConversion(new org.apache.avro.Conversions.DecimalConversion());
+  }
+
+  private static final BinaryMessageEncoder<TestUnionRecord> ENCODER = new BinaryMessageEncoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  private static final BinaryMessageDecoder<TestUnionRecord> DECODER = new BinaryMessageDecoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  /**
+   * Return the BinaryMessageEncoder instance used by this class.
+   * 
+   * @return the message encoder used by this class
+   */
+  public static BinaryMessageEncoder<TestUnionRecord> getEncoder() {
+    return ENCODER;
+  }
+
+  /**
+   * Return the BinaryMessageDecoder instance used by this class.
+   * 
+   * @return the message decoder used by this class
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> getDecoder() {
+    return DECODER;
+  }
+
+  /**
+   * Create a new BinaryMessageDecoder instance for this class that uses the
+   * specified {@link SchemaStore}.
+   * 
+   * @param resolver a {@link SchemaStore} used to find schemas by fingerprint
+   * @return a BinaryMessageDecoder instance for this class backed by the given
+   *         SchemaStore
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> createDecoder(SchemaStore resolver) {
+    return new BinaryMessageDecoder<TestUnionRecord>(MODEL$, SCHEMA$, resolver);
+  }
+
+  /**
+   * Serializes this TestUnionRecord to a ByteBuffer.
+   * 
+   * @return a buffer holding the serialized data for this instance
+   * @throws java.io.IOException if this instance could not be serialized
+   */
+  public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
+    return ENCODER.encode(this);
+  }
+
+  /**
+   * Deserializes a TestUnionRecord from a ByteBuffer.
+   * 
+   * @param b a byte buffer holding serialized data for an instance of this class
+   * @return a TestUnionRecord instance decoded from the given buffer
+   * @throws java.io.IOException if the given bytes could not be deserialized into
+   *                             an instance of this class
+   */
+  public static TestUnionRecord fromByteBuffer(java.nio.ByteBuffer b) throws java.io.IOException {
+    return DECODER.decode(b);
+  }
+
+  private java.math.BigDecimal amount;
+
+  /**
+   * Default constructor. Note that this does not initialize fields to their
+   * default values from the schema. If that is desired then one should use
+   * <code>newBuilder()</code>.
+   */
+  public TestUnionRecord() {
+  }
+
+  /**
+   * All-args constructor.
+   * 
+   * @param amount The new value for amount
+   */
+  public TestUnionRecord(java.math.BigDecimal amount) {
+    this.amount = amount;
+  }
+
+  public SpecificData getSpecificData() {
+    return MODEL$;
+  }
+
+  public org.apache.avro.Schema getSchema() {

Review Comment:
   ## Missing Override annotation
   
   This method overrides [GenericContainer.getSchema](1); it is advisable to add an Override annotation.
   
   [Show more details](https://github.com/apache/avro/security/code-scanning/2721)



##########
lang/java/avro/src/test/java/org/apache/avro/specific/TestUnionRecord.java:
##########
@@ -0,0 +1,306 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+package org.apache.avro.specific;
+
+import org.apache.avro.message.BinaryMessageDecoder;
+import org.apache.avro.message.BinaryMessageEncoder;
+import org.apache.avro.message.SchemaStore;
+
+@AvroGenerated
+public class TestUnionRecord extends SpecificRecordBase implements SpecificRecord {
+  private static final long serialVersionUID = -3829374192747523457L;
+
+  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse(
+      "{\"type\":\"record\",\"name\":\"TestUnionRecord\",\"namespace\":\"org.apache.avro.specific\",\"fields\":[{\"name\":\"amount\",\"type\":[\"null\",{\"type\":\"bytes\",\"logicalType\":\"decimal\",\"precision\":31,\"scale\":8}],\"default\":null}]}");
+
+  public static org.apache.avro.Schema getClassSchema() {
+    return SCHEMA$;
+  }
+
+  private static final SpecificData MODEL$ = new SpecificData();
+  static {
+    MODEL$.addLogicalTypeConversion(new org.apache.avro.Conversions.DecimalConversion());
+  }
+
+  private static final BinaryMessageEncoder<TestUnionRecord> ENCODER = new BinaryMessageEncoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  private static final BinaryMessageDecoder<TestUnionRecord> DECODER = new BinaryMessageDecoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  /**
+   * Return the BinaryMessageEncoder instance used by this class.
+   * 
+   * @return the message encoder used by this class
+   */
+  public static BinaryMessageEncoder<TestUnionRecord> getEncoder() {
+    return ENCODER;
+  }
+
+  /**
+   * Return the BinaryMessageDecoder instance used by this class.
+   * 
+   * @return the message decoder used by this class
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> getDecoder() {
+    return DECODER;
+  }
+
+  /**
+   * Create a new BinaryMessageDecoder instance for this class that uses the
+   * specified {@link SchemaStore}.
+   * 
+   * @param resolver a {@link SchemaStore} used to find schemas by fingerprint
+   * @return a BinaryMessageDecoder instance for this class backed by the given
+   *         SchemaStore
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> createDecoder(SchemaStore resolver) {
+    return new BinaryMessageDecoder<TestUnionRecord>(MODEL$, SCHEMA$, resolver);
+  }
+
+  /**
+   * Serializes this TestUnionRecord to a ByteBuffer.
+   * 
+   * @return a buffer holding the serialized data for this instance
+   * @throws java.io.IOException if this instance could not be serialized
+   */
+  public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
+    return ENCODER.encode(this);
+  }
+
+  /**
+   * Deserializes a TestUnionRecord from a ByteBuffer.
+   * 
+   * @param b a byte buffer holding serialized data for an instance of this class
+   * @return a TestUnionRecord instance decoded from the given buffer
+   * @throws java.io.IOException if the given bytes could not be deserialized into
+   *                             an instance of this class
+   */
+  public static TestUnionRecord fromByteBuffer(java.nio.ByteBuffer b) throws java.io.IOException {
+    return DECODER.decode(b);
+  }
+
+  private java.math.BigDecimal amount;
+
+  /**
+   * Default constructor. Note that this does not initialize fields to their
+   * default values from the schema. If that is desired then one should use
+   * <code>newBuilder()</code>.
+   */
+  public TestUnionRecord() {
+  }
+
+  /**
+   * All-args constructor.
+   * 
+   * @param amount The new value for amount
+   */
+  public TestUnionRecord(java.math.BigDecimal amount) {
+    this.amount = amount;
+  }
+
+  public SpecificData getSpecificData() {
+    return MODEL$;
+  }
+
+  public org.apache.avro.Schema getSchema() {
+    return SCHEMA$;
+  }
+
+  // Used by DatumWriter. Applications should not call.
+  public Object get(int field$) {
+    switch (field$) {
+    case 0:
+      return amount;
+    default:
+      throw new IndexOutOfBoundsException("Invalid index: " + field$);
+    }
+  }
+
+  // Used by DatumReader. Applications should not call.
+  @SuppressWarnings(value = "unchecked")
+  public void put(int field$, Object value$) {

Review Comment:
   ## Missing Override annotation
   
   This method overrides [IndexedRecord.put](1); it is advisable to add an Override annotation.
   
   [Show more details](https://github.com/apache/avro/security/code-scanning/2719)



-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [avro] KalleOlaviNiemitalo commented on a diff in pull request #1721: AVRO-3536: Inherit conversions for Union type

Posted by GitBox <gi...@apache.org>.
KalleOlaviNiemitalo commented on code in PR #1721:
URL: https://github.com/apache/avro/pull/1721#discussion_r910983116


##########
lang/java/avro/src/test/java/org/apache/avro/specific/TestUnionRecord.java:
##########
@@ -0,0 +1,306 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+package org.apache.avro.specific;
+
+import org.apache.avro.message.BinaryMessageDecoder;
+import org.apache.avro.message.BinaryMessageEncoder;
+import org.apache.avro.message.SchemaStore;
+
+@AvroGenerated
+public class TestUnionRecord extends SpecificRecordBase implements SpecificRecord {
+  private static final long serialVersionUID = -3829374192747523457L;
+
+  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse(
+      "{\"type\":\"record\",\"name\":\"TestUnionRecord\",\"namespace\":\"org.apache.avro.specific\",\"fields\":[{\"name\":\"amount\",\"type\":[\"null\",{\"type\":\"bytes\",\"logicalType\":\"decimal\",\"precision\":31,\"scale\":8}],\"default\":null}]}");
+
+  public static org.apache.avro.Schema getClassSchema() {
+    return SCHEMA$;
+  }
+
+  private static final SpecificData MODEL$ = new SpecificData();
+  static {
+    MODEL$.addLogicalTypeConversion(new org.apache.avro.Conversions.DecimalConversion());
+  }
+
+  private static final BinaryMessageEncoder<TestUnionRecord> ENCODER = new BinaryMessageEncoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  private static final BinaryMessageDecoder<TestUnionRecord> DECODER = new BinaryMessageDecoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  /**
+   * Return the BinaryMessageEncoder instance used by this class.
+   * 
+   * @return the message encoder used by this class
+   */
+  public static BinaryMessageEncoder<TestUnionRecord> getEncoder() {
+    return ENCODER;
+  }
+
+  /**
+   * Return the BinaryMessageDecoder instance used by this class.
+   * 
+   * @return the message decoder used by this class
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> getDecoder() {
+    return DECODER;
+  }
+
+  /**
+   * Create a new BinaryMessageDecoder instance for this class that uses the
+   * specified {@link SchemaStore}.
+   * 
+   * @param resolver a {@link SchemaStore} used to find schemas by fingerprint
+   * @return a BinaryMessageDecoder instance for this class backed by the given
+   *         SchemaStore
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> createDecoder(SchemaStore resolver) {
+    return new BinaryMessageDecoder<TestUnionRecord>(MODEL$, SCHEMA$, resolver);
+  }
+
+  /**
+   * Serializes this TestUnionRecord to a ByteBuffer.
+   * 
+   * @return a buffer holding the serialized data for this instance
+   * @throws java.io.IOException if this instance could not be serialized
+   */
+  public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
+    return ENCODER.encode(this);
+  }
+
+  /**
+   * Deserializes a TestUnionRecord from a ByteBuffer.
+   * 
+   * @param b a byte buffer holding serialized data for an instance of this class
+   * @return a TestUnionRecord instance decoded from the given buffer
+   * @throws java.io.IOException if the given bytes could not be deserialized into
+   *                             an instance of this class
+   */
+  public static TestUnionRecord fromByteBuffer(java.nio.ByteBuffer b) throws java.io.IOException {
+    return DECODER.decode(b);
+  }
+
+  private java.math.BigDecimal amount;
+
+  /**
+   * Default constructor. Note that this does not initialize fields to their
+   * default values from the schema. If that is desired then one should use
+   * <code>newBuilder()</code>.
+   */
+  public TestUnionRecord() {
+  }
+
+  /**
+   * All-args constructor.
+   * 
+   * @param amount The new value for amount
+   */
+  public TestUnionRecord(java.math.BigDecimal amount) {
+    this.amount = amount;
+  }
+
+  public SpecificData getSpecificData() {

Review Comment:
   I meant, if the code generator outputs code that causes warnings about missing annotations, then it would be good to file an issue about that and fix it in a separate pull request. But the issue has already been filed so there's no need to do anything more here.



-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [avro] anleib commented on pull request #1721: AVRO-3536: Inherit conversions for Union type

Posted by "anleib (via GitHub)" <gi...@apache.org>.
anleib commented on PR #1721:
URL: https://github.com/apache/avro/pull/1721#issuecomment-1480549544

   Just got hit by this issue as well. When can we expect this to be released?


-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [avro] im-pratham commented on a diff in pull request #1721: AVRO-3536: Inherit conversions for Union type

Posted by GitBox <gi...@apache.org>.
im-pratham commented on code in PR #1721:
URL: https://github.com/apache/avro/pull/1721#discussion_r901006482


##########
lang/java/avro/src/main/java/org/apache/avro/specific/SpecificData.java:
##########
@@ -149,7 +149,7 @@ public static SpecificData get() {
   }
 
   /**
-   * For RECORD type schemas, this method returns the SpecificData instance of the
+   * For RECORD and UNION type schemas, this method returns the SpecificData instance of the

Review Comment:
   happens only with records under union. Added test cases for the same



-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] AVRO-3536: Inherit conversions for Union type [avro]

Posted by "martin-g (via GitHub)" <gi...@apache.org>.
martin-g commented on PR #1721:
URL: https://github.com/apache/avro/pull/1721#issuecomment-1798315751

   It has been released with 1.11.2


-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [avro] opwvhk commented on a diff in pull request #1721: AVRO-3536: Inherit conversions for Union type

Posted by GitBox <gi...@apache.org>.
opwvhk commented on code in PR #1721:
URL: https://github.com/apache/avro/pull/1721#discussion_r898014289


##########
lang/java/avro/src/main/java/org/apache/avro/specific/SpecificData.java:
##########
@@ -149,7 +149,7 @@ public static SpecificData get() {
   }
 
   /**
-   * For RECORD type schemas, this method returns the SpecificData instance of the
+   * For RECORD and UNION type schemas, this method returns the SpecificData instance of the

Review Comment:
   Is this done to also use logical types on record values? 
   If so, would it make sense to support all container types? So record, union, array and map?



-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [avro] nandorKollar merged pull request #1721: AVRO-3536: Inherit conversions for Union type

Posted by GitBox <gi...@apache.org>.
nandorKollar merged PR #1721:
URL: https://github.com/apache/avro/pull/1721


-- 
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: dev-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [avro] mluiten commented on pull request #1721: AVRO-3536: Inherit conversions for Union type

Posted by GitBox <gi...@apache.org>.
mluiten commented on PR #1721:
URL: https://github.com/apache/avro/pull/1721#issuecomment-1271246708

   Any updates on when this will be merged? Seems like it's good to go and it's a really unexpected and annoying bug.


-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [avro] KalleOlaviNiemitalo commented on a diff in pull request #1721: AVRO-3536: Inherit conversions for Union type

Posted by GitBox <gi...@apache.org>.
KalleOlaviNiemitalo commented on code in PR #1721:
URL: https://github.com/apache/avro/pull/1721#discussion_r910994604


##########
lang/java/avro/src/test/java/org/apache/avro/specific/TestUnionRecord.java:
##########
@@ -0,0 +1,306 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+package org.apache.avro.specific;
+
+import org.apache.avro.message.BinaryMessageDecoder;
+import org.apache.avro.message.BinaryMessageEncoder;
+import org.apache.avro.message.SchemaStore;
+
+@AvroGenerated
+public class TestUnionRecord extends SpecificRecordBase implements SpecificRecord {
+  private static final long serialVersionUID = -3829374192747523457L;
+
+  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse(
+      "{\"type\":\"record\",\"name\":\"TestUnionRecord\",\"namespace\":\"org.apache.avro.specific\",\"fields\":[{\"name\":\"amount\",\"type\":[\"null\",{\"type\":\"bytes\",\"logicalType\":\"decimal\",\"precision\":31,\"scale\":8}],\"default\":null}]}");
+
+  public static org.apache.avro.Schema getClassSchema() {
+    return SCHEMA$;
+  }
+
+  private static final SpecificData MODEL$ = new SpecificData();
+  static {
+    MODEL$.addLogicalTypeConversion(new org.apache.avro.Conversions.DecimalConversion());
+  }
+
+  private static final BinaryMessageEncoder<TestUnionRecord> ENCODER = new BinaryMessageEncoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  private static final BinaryMessageDecoder<TestUnionRecord> DECODER = new BinaryMessageDecoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  /**
+   * Return the BinaryMessageEncoder instance used by this class.
+   * 
+   * @return the message encoder used by this class
+   */
+  public static BinaryMessageEncoder<TestUnionRecord> getEncoder() {
+    return ENCODER;
+  }
+
+  /**
+   * Return the BinaryMessageDecoder instance used by this class.
+   * 
+   * @return the message decoder used by this class
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> getDecoder() {
+    return DECODER;
+  }
+
+  /**
+   * Create a new BinaryMessageDecoder instance for this class that uses the
+   * specified {@link SchemaStore}.
+   * 
+   * @param resolver a {@link SchemaStore} used to find schemas by fingerprint
+   * @return a BinaryMessageDecoder instance for this class backed by the given
+   *         SchemaStore
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> createDecoder(SchemaStore resolver) {
+    return new BinaryMessageDecoder<TestUnionRecord>(MODEL$, SCHEMA$, resolver);
+  }
+
+  /**
+   * Serializes this TestUnionRecord to a ByteBuffer.
+   * 
+   * @return a buffer holding the serialized data for this instance
+   * @throws java.io.IOException if this instance could not be serialized
+   */
+  public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
+    return ENCODER.encode(this);
+  }
+
+  /**
+   * Deserializes a TestUnionRecord from a ByteBuffer.
+   * 
+   * @param b a byte buffer holding serialized data for an instance of this class
+   * @return a TestUnionRecord instance decoded from the given buffer
+   * @throws java.io.IOException if the given bytes could not be deserialized into
+   *                             an instance of this class
+   */
+  public static TestUnionRecord fromByteBuffer(java.nio.ByteBuffer b) throws java.io.IOException {
+    return DECODER.decode(b);
+  }
+
+  private java.math.BigDecimal amount;
+
+  /**
+   * Default constructor. Note that this does not initialize fields to their
+   * default values from the schema. If that is desired then one should use
+   * <code>newBuilder()</code>.
+   */
+  public TestUnionRecord() {
+  }
+
+  /**
+   * All-args constructor.
+   * 
+   * @param amount The new value for amount
+   */
+  public TestUnionRecord(java.math.BigDecimal amount) {
+    this.amount = amount;
+  }
+
+  public SpecificData getSpecificData() {

Review Comment:
   Added a reminder in AVRO-2774 to remove the suppressions after the code generator has been fixed.



-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] AVRO-3536: Inherit conversions for Union type [avro]

Posted by "hmsantos (via GitHub)" <gi...@apache.org>.
hmsantos commented on PR #1721:
URL: https://github.com/apache/avro/pull/1721#issuecomment-1812377267

   Tried updating the sample provided on https://issues.apache.org/jira/browse/AVRO-3536 to use release 1.11.3 and it still fails, is something else needed?


-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] AVRO-3536: Inherit conversions for Union type [avro]

Posted by "martin-g (via GitHub)" <gi...@apache.org>.
martin-g commented on PR #1721:
URL: https://github.com/apache/avro/pull/1721#issuecomment-1812398721

   In that case the best would be to open a new JIRA ticket and send a PR with the failing test/sample (and a fix if you know how to fix it).
   AFAIS this PR has been merged to both `main` (1.12.0) and `branch-1.11` (for 1.11.2) but I haven't looked deeper what is in the sample and what is in the PR changes.


-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [avro] Abheeshskurup commented on pull request #1721: AVRO-3536: Inherit conversions for Union type

Posted by "Abheeshskurup (via GitHub)" <gi...@apache.org>.
Abheeshskurup commented on PR #1721:
URL: https://github.com/apache/avro/pull/1721#issuecomment-1430024310

   facing same issue ... if there is a fix already in place ..please share the version


-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [avro] KalleOlaviNiemitalo commented on a diff in pull request #1721: AVRO-3536: Inherit conversions for Union type

Posted by GitBox <gi...@apache.org>.
KalleOlaviNiemitalo commented on code in PR #1721:
URL: https://github.com/apache/avro/pull/1721#discussion_r916538780


##########
lang/java/avro/src/test/java/org/apache/avro/specific/TestUnionRecord.java:
##########
@@ -0,0 +1,306 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+package org.apache.avro.specific;
+
+import org.apache.avro.message.BinaryMessageDecoder;
+import org.apache.avro.message.BinaryMessageEncoder;
+import org.apache.avro.message.SchemaStore;
+
+@AvroGenerated
+public class TestUnionRecord extends SpecificRecordBase implements SpecificRecord {
+  private static final long serialVersionUID = -3829374192747523457L;
+
+  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse(
+      "{\"type\":\"record\",\"name\":\"TestUnionRecord\",\"namespace\":\"org.apache.avro.specific\",\"fields\":[{\"name\":\"amount\",\"type\":[\"null\",{\"type\":\"bytes\",\"logicalType\":\"decimal\",\"precision\":31,\"scale\":8}],\"default\":null}]}");
+
+  public static org.apache.avro.Schema getClassSchema() {
+    return SCHEMA$;
+  }
+
+  private static final SpecificData MODEL$ = new SpecificData();
+  static {
+    MODEL$.addLogicalTypeConversion(new org.apache.avro.Conversions.DecimalConversion());
+  }
+
+  private static final BinaryMessageEncoder<TestUnionRecord> ENCODER = new BinaryMessageEncoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  private static final BinaryMessageDecoder<TestUnionRecord> DECODER = new BinaryMessageDecoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  /**
+   * Return the BinaryMessageEncoder instance used by this class.
+   * 
+   * @return the message encoder used by this class
+   */
+  public static BinaryMessageEncoder<TestUnionRecord> getEncoder() {
+    return ENCODER;
+  }
+
+  /**
+   * Return the BinaryMessageDecoder instance used by this class.
+   * 
+   * @return the message decoder used by this class
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> getDecoder() {
+    return DECODER;
+  }
+
+  /**
+   * Create a new BinaryMessageDecoder instance for this class that uses the
+   * specified {@link SchemaStore}.
+   * 
+   * @param resolver a {@link SchemaStore} used to find schemas by fingerprint
+   * @return a BinaryMessageDecoder instance for this class backed by the given
+   *         SchemaStore
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> createDecoder(SchemaStore resolver) {
+    return new BinaryMessageDecoder<TestUnionRecord>(MODEL$, SCHEMA$, resolver);
+  }
+
+  /**
+   * Serializes this TestUnionRecord to a ByteBuffer.
+   * 
+   * @return a buffer holding the serialized data for this instance
+   * @throws java.io.IOException if this instance could not be serialized
+   */
+  public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
+    return ENCODER.encode(this);
+  }
+
+  /**
+   * Deserializes a TestUnionRecord from a ByteBuffer.
+   * 
+   * @param b a byte buffer holding serialized data for an instance of this class
+   * @return a TestUnionRecord instance decoded from the given buffer
+   * @throws java.io.IOException if the given bytes could not be deserialized into
+   *                             an instance of this class
+   */
+  public static TestUnionRecord fromByteBuffer(java.nio.ByteBuffer b) throws java.io.IOException {
+    return DECODER.decode(b);
+  }
+
+  private java.math.BigDecimal amount;
+
+  /**
+   * Default constructor. Note that this does not initialize fields to their
+   * default values from the schema. If that is desired then one should use
+   * <code>newBuilder()</code>.
+   */
+  public TestUnionRecord() {
+  }
+
+  /**
+   * All-args constructor.
+   * 
+   * @param amount The new value for amount
+   */
+  public TestUnionRecord(java.math.BigDecimal amount) {
+    this.amount = amount;
+  }
+
+  public SpecificData getSpecificData() {

Review Comment:
   AVRO-2774 was fixed. The code could perhaps now be generated without suppressions.



-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] AVRO-3536: Inherit conversions for Union type [avro]

Posted by "AmsterdamFilho (via GitHub)" <gi...@apache.org>.
AmsterdamFilho commented on PR #1721:
URL: https://github.com/apache/avro/pull/1721#issuecomment-1798293403

   When will this be released?


-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [avro] KalleOlaviNiemitalo commented on a diff in pull request #1721: AVRO-3536: Inherit conversions for Union type

Posted by GitBox <gi...@apache.org>.
KalleOlaviNiemitalo commented on code in PR #1721:
URL: https://github.com/apache/avro/pull/1721#discussion_r910984594


##########
lang/java/avro/src/test/java/org/apache/avro/specific/TestUnionRecord.java:
##########
@@ -0,0 +1,306 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+package org.apache.avro.specific;
+
+import org.apache.avro.message.BinaryMessageDecoder;
+import org.apache.avro.message.BinaryMessageEncoder;
+import org.apache.avro.message.SchemaStore;
+
+@AvroGenerated
+public class TestUnionRecord extends SpecificRecordBase implements SpecificRecord {
+  private static final long serialVersionUID = -3829374192747523457L;
+
+  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse(
+      "{\"type\":\"record\",\"name\":\"TestUnionRecord\",\"namespace\":\"org.apache.avro.specific\",\"fields\":[{\"name\":\"amount\",\"type\":[\"null\",{\"type\":\"bytes\",\"logicalType\":\"decimal\",\"precision\":31,\"scale\":8}],\"default\":null}]}");
+
+  public static org.apache.avro.Schema getClassSchema() {
+    return SCHEMA$;
+  }
+
+  private static final SpecificData MODEL$ = new SpecificData();
+  static {
+    MODEL$.addLogicalTypeConversion(new org.apache.avro.Conversions.DecimalConversion());
+  }
+
+  private static final BinaryMessageEncoder<TestUnionRecord> ENCODER = new BinaryMessageEncoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  private static final BinaryMessageDecoder<TestUnionRecord> DECODER = new BinaryMessageDecoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  /**
+   * Return the BinaryMessageEncoder instance used by this class.
+   * 
+   * @return the message encoder used by this class
+   */
+  public static BinaryMessageEncoder<TestUnionRecord> getEncoder() {
+    return ENCODER;
+  }
+
+  /**
+   * Return the BinaryMessageDecoder instance used by this class.
+   * 
+   * @return the message decoder used by this class
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> getDecoder() {
+    return DECODER;
+  }
+
+  /**
+   * Create a new BinaryMessageDecoder instance for this class that uses the
+   * specified {@link SchemaStore}.
+   * 
+   * @param resolver a {@link SchemaStore} used to find schemas by fingerprint
+   * @return a BinaryMessageDecoder instance for this class backed by the given
+   *         SchemaStore
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> createDecoder(SchemaStore resolver) {
+    return new BinaryMessageDecoder<TestUnionRecord>(MODEL$, SCHEMA$, resolver);
+  }
+
+  /**
+   * Serializes this TestUnionRecord to a ByteBuffer.
+   * 
+   * @return a buffer holding the serialized data for this instance
+   * @throws java.io.IOException if this instance could not be serialized
+   */
+  public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
+    return ENCODER.encode(this);
+  }
+
+  /**
+   * Deserializes a TestUnionRecord from a ByteBuffer.
+   * 
+   * @param b a byte buffer holding serialized data for an instance of this class
+   * @return a TestUnionRecord instance decoded from the given buffer
+   * @throws java.io.IOException if the given bytes could not be deserialized into
+   *                             an instance of this class
+   */
+  public static TestUnionRecord fromByteBuffer(java.nio.ByteBuffer b) throws java.io.IOException {
+    return DECODER.decode(b);
+  }
+
+  private java.math.BigDecimal amount;
+
+  /**
+   * Default constructor. Note that this does not initialize fields to their
+   * default values from the schema. If that is desired then one should use
+   * <code>newBuilder()</code>.
+   */
+  public TestUnionRecord() {
+  }
+
+  /**
+   * All-args constructor.
+   * 
+   * @param amount The new value for amount
+   */
+  public TestUnionRecord(java.math.BigDecimal amount) {
+    this.amount = amount;
+  }
+
+  public SpecificData getSpecificData() {

Review Comment:
   no need to do anything more = OK to suppress like you did.



-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [avro] im-pratham commented on a diff in pull request #1721: AVRO-3536: Inherit conversions for Union type

Posted by GitBox <gi...@apache.org>.
im-pratham commented on code in PR #1721:
URL: https://github.com/apache/avro/pull/1721#discussion_r903347825


##########
lang/java/avro/src/test/java/org/apache/avro/specific/TestUnionRecord.java:
##########
@@ -0,0 +1,306 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+package org.apache.avro.specific;
+
+import org.apache.avro.message.BinaryMessageDecoder;
+import org.apache.avro.message.BinaryMessageEncoder;
+import org.apache.avro.message.SchemaStore;
+
+@AvroGenerated
+public class TestUnionRecord extends SpecificRecordBase implements SpecificRecord {
+  private static final long serialVersionUID = -3829374192747523457L;
+
+  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse(
+      "{\"type\":\"record\",\"name\":\"TestUnionRecord\",\"namespace\":\"org.apache.avro.specific\",\"fields\":[{\"name\":\"amount\",\"type\":[\"null\",{\"type\":\"bytes\",\"logicalType\":\"decimal\",\"precision\":31,\"scale\":8}],\"default\":null}]}");
+
+  public static org.apache.avro.Schema getClassSchema() {
+    return SCHEMA$;
+  }
+
+  private static final SpecificData MODEL$ = new SpecificData();
+  static {
+    MODEL$.addLogicalTypeConversion(new org.apache.avro.Conversions.DecimalConversion());
+  }
+
+  private static final BinaryMessageEncoder<TestUnionRecord> ENCODER = new BinaryMessageEncoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  private static final BinaryMessageDecoder<TestUnionRecord> DECODER = new BinaryMessageDecoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  /**
+   * Return the BinaryMessageEncoder instance used by this class.
+   * 
+   * @return the message encoder used by this class
+   */
+  public static BinaryMessageEncoder<TestUnionRecord> getEncoder() {
+    return ENCODER;
+  }
+
+  /**
+   * Return the BinaryMessageDecoder instance used by this class.
+   * 
+   * @return the message decoder used by this class
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> getDecoder() {
+    return DECODER;
+  }
+
+  /**
+   * Create a new BinaryMessageDecoder instance for this class that uses the
+   * specified {@link SchemaStore}.
+   * 
+   * @param resolver a {@link SchemaStore} used to find schemas by fingerprint
+   * @return a BinaryMessageDecoder instance for this class backed by the given
+   *         SchemaStore
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> createDecoder(SchemaStore resolver) {
+    return new BinaryMessageDecoder<TestUnionRecord>(MODEL$, SCHEMA$, resolver);
+  }
+
+  /**
+   * Serializes this TestUnionRecord to a ByteBuffer.
+   * 
+   * @return a buffer holding the serialized data for this instance
+   * @throws java.io.IOException if this instance could not be serialized
+   */
+  public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
+    return ENCODER.encode(this);
+  }
+
+  /**
+   * Deserializes a TestUnionRecord from a ByteBuffer.
+   * 
+   * @param b a byte buffer holding serialized data for an instance of this class
+   * @return a TestUnionRecord instance decoded from the given buffer
+   * @throws java.io.IOException if the given bytes could not be deserialized into
+   *                             an instance of this class
+   */
+  public static TestUnionRecord fromByteBuffer(java.nio.ByteBuffer b) throws java.io.IOException {
+    return DECODER.decode(b);
+  }
+
+  private java.math.BigDecimal amount;
+
+  /**
+   * Default constructor. Note that this does not initialize fields to their
+   * default values from the schema. If that is desired then one should use
+   * <code>newBuilder()</code>.
+   */
+  public TestUnionRecord() {
+  }
+
+  /**
+   * All-args constructor.
+   * 
+   * @param amount The new value for amount
+   */
+  public TestUnionRecord(java.math.BigDecimal amount) {
+    this.amount = amount;
+  }
+
+  public SpecificData getSpecificData() {
+    return MODEL$;
+  }
+
+  public org.apache.avro.Schema getSchema() {
+    return SCHEMA$;
+  }
+
+  // Used by DatumWriter. Applications should not call.
+  public Object get(int field$) {

Review Comment:
   This is auto generated avro code. Added @Suppress



##########
lang/java/avro/src/test/java/org/apache/avro/specific/TestUnionRecord.java:
##########
@@ -0,0 +1,306 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+package org.apache.avro.specific;
+
+import org.apache.avro.message.BinaryMessageDecoder;
+import org.apache.avro.message.BinaryMessageEncoder;
+import org.apache.avro.message.SchemaStore;
+
+@AvroGenerated
+public class TestUnionRecord extends SpecificRecordBase implements SpecificRecord {
+  private static final long serialVersionUID = -3829374192747523457L;
+
+  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse(
+      "{\"type\":\"record\",\"name\":\"TestUnionRecord\",\"namespace\":\"org.apache.avro.specific\",\"fields\":[{\"name\":\"amount\",\"type\":[\"null\",{\"type\":\"bytes\",\"logicalType\":\"decimal\",\"precision\":31,\"scale\":8}],\"default\":null}]}");
+
+  public static org.apache.avro.Schema getClassSchema() {
+    return SCHEMA$;
+  }
+
+  private static final SpecificData MODEL$ = new SpecificData();
+  static {
+    MODEL$.addLogicalTypeConversion(new org.apache.avro.Conversions.DecimalConversion());
+  }
+
+  private static final BinaryMessageEncoder<TestUnionRecord> ENCODER = new BinaryMessageEncoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  private static final BinaryMessageDecoder<TestUnionRecord> DECODER = new BinaryMessageDecoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  /**
+   * Return the BinaryMessageEncoder instance used by this class.
+   * 
+   * @return the message encoder used by this class
+   */
+  public static BinaryMessageEncoder<TestUnionRecord> getEncoder() {
+    return ENCODER;
+  }
+
+  /**
+   * Return the BinaryMessageDecoder instance used by this class.
+   * 
+   * @return the message decoder used by this class
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> getDecoder() {
+    return DECODER;
+  }
+
+  /**
+   * Create a new BinaryMessageDecoder instance for this class that uses the
+   * specified {@link SchemaStore}.
+   * 
+   * @param resolver a {@link SchemaStore} used to find schemas by fingerprint
+   * @return a BinaryMessageDecoder instance for this class backed by the given
+   *         SchemaStore
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> createDecoder(SchemaStore resolver) {
+    return new BinaryMessageDecoder<TestUnionRecord>(MODEL$, SCHEMA$, resolver);
+  }
+
+  /**
+   * Serializes this TestUnionRecord to a ByteBuffer.
+   * 
+   * @return a buffer holding the serialized data for this instance
+   * @throws java.io.IOException if this instance could not be serialized
+   */
+  public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
+    return ENCODER.encode(this);
+  }
+
+  /**
+   * Deserializes a TestUnionRecord from a ByteBuffer.
+   * 
+   * @param b a byte buffer holding serialized data for an instance of this class
+   * @return a TestUnionRecord instance decoded from the given buffer
+   * @throws java.io.IOException if the given bytes could not be deserialized into
+   *                             an instance of this class
+   */
+  public static TestUnionRecord fromByteBuffer(java.nio.ByteBuffer b) throws java.io.IOException {
+    return DECODER.decode(b);
+  }
+
+  private java.math.BigDecimal amount;
+
+  /**
+   * Default constructor. Note that this does not initialize fields to their
+   * default values from the schema. If that is desired then one should use
+   * <code>newBuilder()</code>.
+   */
+  public TestUnionRecord() {
+  }
+
+  /**
+   * All-args constructor.
+   * 
+   * @param amount The new value for amount
+   */
+  public TestUnionRecord(java.math.BigDecimal amount) {
+    this.amount = amount;
+  }
+
+  public SpecificData getSpecificData() {
+    return MODEL$;
+  }
+
+  public org.apache.avro.Schema getSchema() {

Review Comment:
   This is auto generated avro code. Added @Suppress



-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [avro] im-pratham commented on a diff in pull request #1721: AVRO-3536: Inherit conversions for Union type

Posted by GitBox <gi...@apache.org>.
im-pratham commented on code in PR #1721:
URL: https://github.com/apache/avro/pull/1721#discussion_r903347990


##########
lang/java/avro/src/test/java/org/apache/avro/specific/TestUnionRecord.java:
##########
@@ -0,0 +1,306 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+package org.apache.avro.specific;
+
+import org.apache.avro.message.BinaryMessageDecoder;
+import org.apache.avro.message.BinaryMessageEncoder;
+import org.apache.avro.message.SchemaStore;
+
+@AvroGenerated
+public class TestUnionRecord extends SpecificRecordBase implements SpecificRecord {
+  private static final long serialVersionUID = -3829374192747523457L;
+
+  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse(
+      "{\"type\":\"record\",\"name\":\"TestUnionRecord\",\"namespace\":\"org.apache.avro.specific\",\"fields\":[{\"name\":\"amount\",\"type\":[\"null\",{\"type\":\"bytes\",\"logicalType\":\"decimal\",\"precision\":31,\"scale\":8}],\"default\":null}]}");
+
+  public static org.apache.avro.Schema getClassSchema() {
+    return SCHEMA$;
+  }
+
+  private static final SpecificData MODEL$ = new SpecificData();
+  static {
+    MODEL$.addLogicalTypeConversion(new org.apache.avro.Conversions.DecimalConversion());
+  }
+
+  private static final BinaryMessageEncoder<TestUnionRecord> ENCODER = new BinaryMessageEncoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  private static final BinaryMessageDecoder<TestUnionRecord> DECODER = new BinaryMessageDecoder<TestUnionRecord>(MODEL$,
+      SCHEMA$);
+
+  /**
+   * Return the BinaryMessageEncoder instance used by this class.
+   * 
+   * @return the message encoder used by this class
+   */
+  public static BinaryMessageEncoder<TestUnionRecord> getEncoder() {
+    return ENCODER;
+  }
+
+  /**
+   * Return the BinaryMessageDecoder instance used by this class.
+   * 
+   * @return the message decoder used by this class
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> getDecoder() {
+    return DECODER;
+  }
+
+  /**
+   * Create a new BinaryMessageDecoder instance for this class that uses the
+   * specified {@link SchemaStore}.
+   * 
+   * @param resolver a {@link SchemaStore} used to find schemas by fingerprint
+   * @return a BinaryMessageDecoder instance for this class backed by the given
+   *         SchemaStore
+   */
+  public static BinaryMessageDecoder<TestUnionRecord> createDecoder(SchemaStore resolver) {
+    return new BinaryMessageDecoder<TestUnionRecord>(MODEL$, SCHEMA$, resolver);
+  }
+
+  /**
+   * Serializes this TestUnionRecord to a ByteBuffer.
+   * 
+   * @return a buffer holding the serialized data for this instance
+   * @throws java.io.IOException if this instance could not be serialized
+   */
+  public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
+    return ENCODER.encode(this);
+  }
+
+  /**
+   * Deserializes a TestUnionRecord from a ByteBuffer.
+   * 
+   * @param b a byte buffer holding serialized data for an instance of this class
+   * @return a TestUnionRecord instance decoded from the given buffer
+   * @throws java.io.IOException if the given bytes could not be deserialized into
+   *                             an instance of this class
+   */
+  public static TestUnionRecord fromByteBuffer(java.nio.ByteBuffer b) throws java.io.IOException {
+    return DECODER.decode(b);
+  }
+
+  private java.math.BigDecimal amount;
+
+  /**
+   * Default constructor. Note that this does not initialize fields to their
+   * default values from the schema. If that is desired then one should use
+   * <code>newBuilder()</code>.
+   */
+  public TestUnionRecord() {
+  }
+
+  /**
+   * All-args constructor.
+   * 
+   * @param amount The new value for amount
+   */
+  public TestUnionRecord(java.math.BigDecimal amount) {
+    this.amount = amount;
+  }
+
+  public SpecificData getSpecificData() {

Review Comment:
   This is auto generated avro code. Added @Suppress



-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org