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/05 13:21:44 UTC

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

JingsongLi opened a new pull request, #199:
URL: https://github.com/apache/flink-table-store/pull/199

   TABLE(a, b, c), pk is a
   Query: SELECT * FROM T WHERE a = '...';
   If a is a specific value, we can know which bucket is needed. We don't need to read other buckets.


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


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

Posted by GitBox <gi...@apache.org>.
JingsongLi merged PR #199:
URL: https://github.com/apache/flink-table-store/pull/199


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


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

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on PR #199:
URL: https://github.com/apache/flink-table-store/pull/199#issuecomment-1175889238

   > I'd like to hide bucket keys from `FileStore`. We should handle them only in `FileStoreTable` so that `FileStoreScan` only needs to know the indices of the buckets to scan.
   
   I think bucket is a concept that FileStore already perceives
   - `KeyValueFileStoreScan` is only used to know that the bucket key must be in the key (it only senses Key and Value)
   - `AppendOnlyFileStoreScan` only needs to know that the bucket key must be in the Row
   
   Previously, we also discussed the concept of putting bucket writers' maintenance in the FileStore, theoretically Table level just wrap Row.


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


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

Posted by GitBox <gi...@apache.org>.
tsreaper commented on code in PR #199:
URL: https://github.com/apache/flink-table-store/pull/199#discussion_r914496241


##########
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:
   Why do we need these? Each function has only one instance.



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