This is an automated email from the ASF dual-hosted git repository.
JingsongLi 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 e0cc46c868 [core] Fix incorrect file indexes table range filtering
(#9176)
e0cc46c868 is described below
commit e0cc46c868f13a40bc99fa7ba769635a89e4ca2a
Author: Arnav Balyan <[email protected]>
AuthorDate: Thu Aug 13 19:38:57 2026 +0530
[core] Fix incorrect file indexes table range filtering (#9176)
---
.../java/org/apache/paimon/table/system/FileIndexesTable.java | 11 +----------
.../org/apache/paimon/table/system/FileIndexesTableTest.java | 7 +++++++
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git
a/paimon-core/src/main/java/org/apache/paimon/table/system/FileIndexesTable.java
b/paimon-core/src/main/java/org/apache/paimon/table/system/FileIndexesTable.java
index f79419c449..b13ccd7bb9 100644
---
a/paimon-core/src/main/java/org/apache/paimon/table/system/FileIndexesTable.java
+++
b/paimon-core/src/main/java/org/apache/paimon/table/system/FileIndexesTable.java
@@ -67,7 +67,6 @@ import java.io.UncheckedIOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
-import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -198,8 +197,6 @@ public class FileIndexesTable implements ReadonlyTable {
private static class FileIndexesRead implements InnerTableRead {
- private static final Set<String> SCAN_PUSHDOWN_FIELDS =
- Collections.unmodifiableSet(new
HashSet<>(Arrays.asList("partition", "bucket")));
private static final Set<String> FILE_PUSHDOWN_FIELDS =
Collections.singleton("file_path");
private final FileStoreTable storeTable;
@@ -216,13 +213,7 @@ public class FileIndexesTable implements ReadonlyTable {
@Override
public InnerTableRead withFilter(Predicate predicate) {
- List<Predicate> remaining =
- PredicateBuilder.splitAnd(predicate).stream()
- .filter(
- p ->
- !(p instanceof LeafPredicate)
- || !onlyContainsFields(p,
SCAN_PUSHDOWN_FIELDS))
- .collect(Collectors.toList());
+ List<Predicate> remaining = new
ArrayList<>(PredicateBuilder.splitAnd(predicate));
List<Predicate> filePredicates =
remaining.stream()
.filter(p -> onlyContainsFields(p,
FILE_PUSHDOWN_FIELDS))
diff --git
a/paimon-core/src/test/java/org/apache/paimon/table/system/FileIndexesTableTest.java
b/paimon-core/src/test/java/org/apache/paimon/table/system/FileIndexesTableTest.java
index a3a90d1b45..133d07238c 100644
---
a/paimon-core/src/test/java/org/apache/paimon/table/system/FileIndexesTableTest.java
+++
b/paimon-core/src/test/java/org/apache/paimon/table/system/FileIndexesTableTest.java
@@ -157,6 +157,13 @@ public class FileIndexesTableTest extends TableTestBase {
readWithFilter(fileIndexesTable, builder.equal(0,
BinaryString.fromString("{1}")));
assertThat(partitionRows).hasSize(2);
+ assertThat(
+ readWithFilter(
+ fileIndexesTable,
+ PredicateBuilder.and(
+ builder.greaterThan(1, 0),
builder.lessThan(1, 1))))
+ .isEmpty();
+
String filePath = partitionRows.get(0).getString(2).toString();
List<InternalRow> fileRows =
readWithFilter(