This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git
The following commit(s) were added to refs/heads/master by this push:
new 6117068e75 [hotfix] Add comments in FileIndexEvaluator
6117068e75 is described below
commit 6117068e75960814073020871d93d70661d3b03c
Author: JingsongLi <[email protected]>
AuthorDate: Thu Aug 21 13:24:43 2025 +0800
[hotfix] Add comments in FileIndexEvaluator
---
.../src/main/java/org/apache/paimon/io/FileIndexEvaluator.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git
a/paimon-core/src/main/java/org/apache/paimon/io/FileIndexEvaluator.java
b/paimon-core/src/main/java/org/apache/paimon/io/FileIndexEvaluator.java
index 0a5505d48d..025887cefc 100644
--- a/paimon-core/src/main/java/org/apache/paimon/io/FileIndexEvaluator.java
+++ b/paimon-core/src/main/java/org/apache/paimon/io/FileIndexEvaluator.java
@@ -74,6 +74,10 @@ public class FileIndexEvaluator {
result = predicate.evaluate(filter);
result.and(selection);
} else if (topN != null) {
+ // 1. TopN cannot work with filter, because a filter may not
completely filter out
+ // all records, any unfiltered records can affect the
calculation results of TopN
+ // 2. evaluateTopN with selection, because we must filter out
the data based on
+ // deletion vector before selecting TopN records.
result = predicate.evaluateTopN(topN, selection);
} else {
return FileIndexResult.REMAIN;