RustedBones commented on code in PR #26320:
URL: https://github.com/apache/beam/pull/26320#discussion_r1207010786


##########
sdks/java/extensions/avro/src/main/java/org/apache/beam/sdk/extensions/avro/coders/AvroCoder.java:
##########
@@ -768,53 +695,22 @@ private static Field getField(Class<?> originalClazz, 
String name) {
     }
   }
 
+  /**
+   * @return {@code true} if the two {@link AvroCoder} instances have the same 
class, type and
+   *     schema.
+   */
   @Override
   public boolean equals(@Nullable Object other) {
-    if (other == this) {
-      return true;
-    }
-    if (!(other instanceof AvroCoder)) {
+    if (other == null || this.getClass() != other.getClass()) {
       return false;
     }
     AvroCoder<?> that = (AvroCoder<?>) other;
     return Objects.equals(this.schemaSupplier.get(), that.schemaSupplier.get())
-        && Objects.equals(this.typeDescriptor, that.typeDescriptor)
-        && this.useReflectApi == that.useReflectApi;
+        && Objects.equals(this.typeDescriptor, that.typeDescriptor);
   }
 
   @Override
   public int hashCode() {
-    return Objects.hash(schemaSupplier.get(), typeDescriptor, useReflectApi);
-  }
-
-  /**
-   * Conversion for DateTime.
-   *
-   * <p>This is a copy from Avro 1.8's TimestampConversion, which is renamed 
in Avro 1.9. Defining
-   * own copy gives flexibility for Beam Java SDK to work with Avro 1.8 and 
1.9 at runtime.
-   *
-   * @see <a href="https://issues.apache.org/jira/browse/BEAM-9144";>BEAM-9144: 
Beam's own Avro
-   *     TimeConversion class in beam-sdk-java-core</a>
-   */
-  public static class JodaTimestampConversion extends Conversion<DateTime> {

Review Comment:
   I added all logical type conversions to the `ReflectDatumFacory`



-- 
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]

Reply via email to