You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/07/06 07:40:58 UTC

[GitHub] [flink-table-store] JingsongLi commented on a diff in pull request #199: [FLINK-28159] Table Store: Bucket pruning based on bucket key filter

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

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