jackylee-ch opened a new pull request, #826: URL: https://github.com/apache/paimon-rust/pull/826
`write_block` sent FM blocks through `compress_block`, which prepends an uncompressed-size varint. The varint belongs to the SST and bitmap block formats, not the codec: Java's `FMIndexFile#writeBlock` stores `BlockCompressor` output verbatim with `storedLength = compressedLength`, and `decodeStoredBlock` decompresses it directly. So paimon-rust cannot read a Java-written FM global index, failing with `Compressed block size does not match its metadata`, and Java cannot read ours. Both default to `lz4`, and ZSTD is affected too since the varint precedes the codec branch. **Fix**: add a codec-only pair, `compress_codec_block` and `decompress_codec_block`, and point FM at it. `compress_block` keeps the varint for SST and bitmap, where Java does prepend it. The V1 goldens store blocks uncompressed, so no test covered this; the new one asserts the stored bytes against Java's envelope. -- 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]
