cxzl25 opened a new pull request, #10718:
URL: https://github.com/apache/paimon/pull/10718
### Purpose
```sql
CREATE TABLE t (id INT, v STRING) TBLPROPERTIES
('file-index.range-bitmap.columns' = 'id');
INSERT INTO t VALUES (1, 'a'), (NULL, 'b'), (3, 'c');
SELECT v FROM t WHERE id IN (1, NULL);
```
```java
Caused by: java.lang.NullPointerException
at java.util.Comparator.lambda$comparing$77a9974f$1(Comparator.java:469)
at
org.apache.paimon.fileindex.rangebitmap.RangeBitmap.eq(RangeBitmap.java:102)
at
org.apache.paimon.fileindex.rangebitmap.RangeBitmapFileIndex$Reader.lambda$visitEqual$0(RangeBitmapFileIndex.java:128)
at org.apache.paimon.utils.LazyField.get(LazyField.java:40)
at
org.apache.paimon.fileindex.bitmap.BitmapIndexResult.remain(BitmapIndexResult.java:37)
at
org.apache.paimon.fileindex.FileIndexPredicate$FileIndexPredicateTest.visit(FileIndexPredicate.java:191)
at
org.apache.paimon.fileindex.FileIndexPredicate$FileIndexPredicateTest.visit(FileIndexPredicate.java:163)
at
org.apache.paimon.predicate.LeafPredicate.visit(LeafPredicate.java:179)
at
org.apache.paimon.fileindex.FileIndexPredicate$FileIndexPredicateTest.visit(FileIndexPredicate.java:206)
at
org.apache.paimon.fileindex.FileIndexPredicate$FileIndexPredicateTest.visit(FileIndexPredicate.java:163)
at
org.apache.paimon.predicate.CompoundPredicate.visit(CompoundPredicate.java:82)
at
org.apache.paimon.fileindex.FileIndexPredicate$FileIndexPredicateTest.test(FileIndexPredicate.java:172)
at
org.apache.paimon.fileindex.FileIndexPredicate.evaluate(FileIndexPredicate.java:118)
at
org.apache.paimon.operation.AppendOnlyFileStoreScan.testFileIndex(AppendOnlyFileStoreScan.java:183)
at
org.apache.paimon.operation.AppendOnlyFileStoreScan.filterByStats(AppendOnlyFileStoreScan.java:164)
at
org.apache.paimon.operation.AbstractFileStoreScan.lambda$readManifest$16(AbstractFileStoreScan.java:556)
at
org.apache.paimon.utils.SimpleObjectsCache.readFromSegments(SimpleObjectsCache.java:104)
at
org.apache.paimon.manifest.ManifestEntryCache.readFromSegments(ManifestEntryCache.java:205)
at
org.apache.paimon.manifest.ManifestEntryCache.readFromSegments(ManifestEntryCache.java:65)
at org.apache.paimon.utils.ObjectsCache.read(ObjectsCache.java:96)
at org.apache.paimon.manifest.ManifestFile.read(ManifestFile.java:180)
at
org.apache.paimon.operation.AbstractFileStoreScan.readManifest(AbstractFileStoreScan.java:546)
at
org.apache.paimon.operation.AbstractFileStoreScan.lambda$readAndMergeFileEntries$12(AbstractFileStoreScan.j
```
Fix
```sql
spark-sql (default)> SELECT v FROM t WHERE id IN (1, NULL);
a
```
### Tests
Add UT
--
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]