JingsongLi commented on code in PR #6407:
URL: https://github.com/apache/paimon/pull/6407#discussion_r2435812186
##########
paimon-core/src/main/java/org/apache/paimon/index/IndexFileHandler.java:
##########
@@ -87,6 +101,123 @@ public Optional<IndexFileMeta> scanHashIndex(
return result.isEmpty() ? Optional.empty() :
Optional.of(result.get(0));
}
+ public void withCacheMetrics(@Nullable CacheMetrics cacheMetrics) {
+ this.cacheMetrics = cacheMetrics;
+ }
+
+ @Nullable
+ // Construct DataFile -> DeletionFile based on IndexFileMeta
+ public Map<String, DeletionFile> extractDeletionFileByMeta(
+ BinaryRow partition, Integer bucket, IndexFileMeta fileMeta) {
+ if (fileMeta.dvRanges() != null && fileMeta.dvRanges().size() > 0) {
+ Map<String, DeletionFile> result = new HashMap<>();
+ for (DeletionVectorMeta dvMeta : fileMeta.dvRanges().values()) {
+ result.put(
+ dvMeta.dataFileName(),
+ new DeletionFile(
+ dvIndex(partition,
bucket).path(fileMeta).toString(),
Review Comment:
DeletionVectorsIndexFile dvIndex = dvIndex(partition, bucket); to avoid
create everytime.
--
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]