You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/06/25 02:59:28 UTC

[GitHub] [iceberg] chenjunjiedada commented on a diff in pull request #5100: Data: delete compaction optimization by bloom filter

chenjunjiedada commented on code in PR #5100:
URL: https://github.com/apache/iceberg/pull/5100#discussion_r906624572


##########
data/src/main/java/org/apache/iceberg/data/DeleteFilter.java:
##########
@@ -133,10 +144,19 @@ public CloseableIterable<T> filter(CloseableIterable<T> records) {
 
   private List<Predicate<T>> applyEqDeletes() {
     List<Predicate<T>> isInDeleteSets = Lists.newArrayList();
+    Map<BlockMetaData, BloomFilterReader> parquetBloomFilterReader = Maps.newHashMap();
+    ParquetFileReader parquetReader = null;
+    Predicate<Record> isInBloomFilter = null;
     if (eqDeletes.isEmpty()) {
       return isInDeleteSets;
     }
 
+    // load bloomfilter readers from data file
+    if (filePath.endsWith(".parquet")) {
+      parquetReader = ParquetUtil.openFile(getInputFile(filePath));

Review Comment:
   Can we use `try-with-resource` here?



-- 
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@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org