You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "leaves12138 (via GitHub)" <gi...@apache.org> on 2026/06/05 14:40:08 UTC

[PR] [core] Fix BTree index meta for empty keys [paimon]

leaves12138 opened a new pull request, #8140:
URL: https://github.com/apache/paimon/pull/8140

   ### Purpose
   BTreeIndexMeta used zero-length encoded keys to represent null boundaries. This collides with valid empty serialized keys, for example an empty string, and can deserialize BTree metadata with a null boundary key. Readers or compactors that wrap the boundary key can then hit a NullPointerException.
   
   ### Changes
   - Add an explicit metadata format marker and null-key flags for BTree index metadata.
   - Preserve compatibility with legacy all-null metadata.
   - Treat legacy half-empty metadata as an empty serialized key instead of null.
   - Add regression coverage for empty serialized keys and BTree index writer metadata.
   
   ### Tests
   - `mvn -pl paimon-common -am -Dtest=BTreeIndexMetaTest,BTreeFileMetaSelectorTest -DfailIfNoTests=false test`
   


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [core] Fix BTree index meta for empty keys [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on PR #8140:
URL: https://github.com/apache/paimon/pull/8140#issuecomment-4637978423

   I reviewed this PR as part of a pass over recent open non-draft Paimon PRs. I did not find any clear correctness, compatibility, or regression issue to flag from the current diff.


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [core] Fix BTree index meta for empty keys [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #8140:
URL: https://github.com/apache/paimon/pull/8140


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [core] Fix BTree index meta for empty keys [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on PR #8140:
URL: https://github.com/apache/paimon/pull/8140#issuecomment-4637986476

   +1


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org