You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "aromanenko-dev (via GitHub)" <gi...@apache.org> on 2023/05/25 14:34:06 UTC

[GitHub] [beam] aromanenko-dev commented on a diff in pull request #26320: Select dedicated avro datum reader and writer

aromanenko-dev commented on code in PR #26320:
URL: https://github.com/apache/beam/pull/26320#discussion_r1202493419


##########
sdks/java/extensions/avro/src/main/java/org/apache/beam/sdk/extensions/avro/coders/AvroCoder.java:
##########
@@ -116,56 +106,40 @@
 @SuppressWarnings({
   "nullness" // TODO(https://github.com/apache/beam/issues/20497)
 })
-public class AvroCoder<T> extends CustomCoder<T> {
+public abstract class AvroCoder<T> extends CustomCoder<T> {

Review Comment:
   Why this class became `abstract`?



##########
sdks/java/extensions/avro/src/main/java/org/apache/beam/sdk/extensions/avro/coders/AvroCoder.java:
##########
@@ -116,56 +106,40 @@
 @SuppressWarnings({
   "nullness" // TODO(https://github.com/apache/beam/issues/20497)
 })
-public class AvroCoder<T> extends CustomCoder<T> {
+public abstract class AvroCoder<T> extends CustomCoder<T> {
 
   /**
    * Returns an {@code AvroCoder} instance for the provided element type.
    *
    * @param <T> the element type
    */
   public static <T> AvroCoder<T> of(TypeDescriptor<T> type) {
-    return of(type, true);
-  }
-
-  /**
-   * Returns an {@code AvroCoder} instance for the provided element type, respecting whether to use
-   * Avro's Reflect* or Specific* suite for encoding and decoding.
-   *
-   * @param <T> the element type
-   */
-  public static <T> AvroCoder<T> of(TypeDescriptor<T> type, boolean useReflectApi) {

Review Comment:
   Here and in other places, I'd recommend to avoid such breaking changes in public API (delete public methods/classes) and keep and deprecate them instead.



-- 
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: github-unsubscribe@beam.apache.org

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