JingsongLi commented on code in PR #199:
URL: https://github.com/apache/flink-table-store/pull/199#discussion_r914514054


##########
flink-table-store-core/src/main/java/org/apache/flink/table/store/file/predicate/CompoundPredicate.java:
##########
@@ -72,12 +72,26 @@ public boolean equals(Object o) {
     }
 
     /** Evaluate the predicate result based on multiple {@link Predicate}s. */
-    public interface Function extends Serializable {
+    public abstract static class Function implements Serializable {
 
-        boolean test(Object[] values, List<Predicate> children);
+        public abstract boolean test(Object[] values, List<Predicate> 
children);
 
-        boolean test(long rowCount, FieldStats[] fieldStats, List<Predicate> 
children);
+        public abstract boolean test(
+                long rowCount, FieldStats[] fieldStats, List<Predicate> 
children);
 
-        Optional<Predicate> negate(List<Predicate> children);
+        public abstract Optional<Predicate> negate(List<Predicate> children);
+
+        @Override
+        public int hashCode() {
+            return this.getClass().getName().hashCode();
+        }
+
+        @Override
+        public boolean equals(Object o) {
+            if (this == o) {
+                return true;
+            }
+            return o != null && getClass() == o.getClass();
+        }

Review Comment:
   After deserialization, the instance becomes different



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