weibangpeng opened a new pull request, #8312: URL: https://github.com/apache/paimon/pull/8312
## Summary Fix NullPointerException when using btree global index on STRING columns with empty string keys. ## Root cause When `SortedIndexFileMeta.firstKey()` or `lastKey()` returns null (from null-flagged index file metadata), `compareFirstKey`/`compareLastKey`/`overlaps` passes null to `deserialize()`, causing NPE. ## Fix Add null guards: - `compareFirstKey`: return -1 for null firstKey (no lower bound) - `compareLastKey`: return 1 for null lastKey (no upper bound) - `overlaps`: skip comparison when key is null ## Test Added `testEmptyStringKeyDoesNotThrowNPE` covering visitEqual, visitLessThan, visitGreaterThan, visitIn, and visitBetween. Closes #7811 -- 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]
