yanbinyang opened a new pull request, #604:
URL: https://github.com/apache/paimon-rust/pull/604
### Purpose
Linked issue: close #603
`BinaryRow::new(0)` is an in-memory stub with no backing bytes. Its
`to_serialized_bytes()` method consequently emitted only the 4-byte arity,
although Paimon's schemaless BinaryRow format also requires the 8-byte fixed
part. Native DataSplit serialization therefore produced bytes that its strict
decoder correctly rejected for non-partitioned tables.
This is consistent with the existing fixes in #349 and #364: the empty-row
writer must emit the Java-compatible 12-byte value, while the decoder must
continue rejecting truncated bodies. The missing case became visible after #565
added native DataSplit deserialization.
### Brief change log
- Normalize `arity == 0 && data.is_empty()` in
`BinaryRow::to_serialized_bytes()` to the existing `EMPTY_SERIALIZED_ROW`.
- Add a BinaryRow regression test for the exact 12-byte Java wire
representation.
- Add an empty-partition DataSplit native round-trip test using bytes
generated by Apache Paimon Java 1.4.2.
### Tests
- Independent Java verification with Maven Central
`org.apache.paimon:paimon-bundle:1.4.2`:
- empty BinaryRow serde is byte-stable and 12 bytes;
- empty-partition DataSplit serde round-trips;
- generated DataSplit bytes are 77 bytes.
- `cargo +1.92 test -p paimon --lib` — 1899 passed, 0 failed, 1 ignored.
- `cargo +1.92 clippy -p paimon --all-targets -- -D warnings` — passed.
- `cargo +1.92 fmt --all -- --check` — passed.
### API and Format
No API or wire-version change. This fixes the arity-zero serialization path
to conform to the existing Java BinaryRow format. Populated rows are unchanged,
and the strict decoder remains unchanged.
### Documentation
No documentation update is required. The serializer comment records why the
canonical empty row needs normalization.
--
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]