zhoulii commented on code in PR #7812:
URL: https://github.com/apache/paimon/pull/7812#discussion_r3219160449


##########
paimon-common/src/main/java/org/apache/paimon/globalindex/btree/BTreeIndexMeta.java:
##########
@@ -70,13 +70,13 @@ public byte[] serialize() {
             sliceOutput.writeInt(firstKey.length);
             sliceOutput.writeBytes(firstKey);
         } else {
-            sliceOutput.writeInt(0);
+            sliceOutput.writeInt(-1);
         }
         if (lastKey != null) {
             sliceOutput.writeInt(lastKey.length);
             sliceOutput.writeBytes(lastKey);
         } else {
-            sliceOutput.writeInt(0);

Review Comment:
    Good catch! You're right — there is a backward compatibility risk. When an 
old-version file has all-null keys (serialized as int(0) for both keys), the 
new deserializer would incorrectly read them as byte[0] instead of null. Fixed 
already.



-- 
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]

Reply via email to