hemanthsavasere opened a new pull request, #442:
URL: https://github.com/apache/fluss-rust/pull/442

   ### Purpose
   
   Linked issue: close #388
   
   `DataType::Row` was defined in the schema layer but the serialization stack 
was entirely missing — `CompactedRowWriter`/`Reader` panicked, 
`FieldGetter`/`ValueWriter` hit `unimplemented!()`, and `Datum` had no `Row` 
variant. This PR wires up the full stack.
   
   ### Brief change log
   
   - Add `Datum::Row(Box<GenericRow<'a>>)` variant and `as_row()` accessor
   - Add `get_row()` to `InternalRow` trait with a default error impl 
(non-breaking)
   - Implement `get_row()` on `GenericRow` and `CompactedRow` (delegates to 
decoded row)
   - Implement `ColumnarRow::get_row()` via Arrow `StructArray` extraction with 
`OnceLock` caching per column, invalidated on `set_row_id()`
   - Add `InnerValueWriter::Row(RowType)` — serializes into a temporary 
`CompactedRowWriter` then calls `write_bytes`, matching Java's `writeRow` wire 
format
   - Add `DataType::Row` arm in `CompactedRowDeserializer` using `read_bytes` + 
recursive deserialize
   - Add `InnerFieldGetter::Row` — automatically enables ROW in 
`CompactedKeyEncoder` with no further changes
   - Handle `Datum::Row` in C++ `resolve_row_types` (recursive)
   
   ### Tests
   
   - `test_row_simple_nesting` — round-trip `ROW<INT, STRING>`
   - `test_row_deep_nesting` — round-trip `ROW<ROW<INT>>` (two levels)
   - `test_row_with_nullable_fields` — null field inside nested row; null outer 
ROW column
   - `test_row_as_primary_key` — ROW through `CompactedKeyEncoder`; asserts 
non-empty, deterministic, and distinguishable output
   - `columnar_row_reads_nested_row`, `columnar_row_reads_deeply_nested_row`, 
`columnar_row_get_row_cache_invalidated_on_set_row_id` — Arrow `StructArray` 
extraction
   
   All 257 tests pass. No new clippy warnings.
   
   ### API and Format
   
   **API**: `Datum::Row` is a new variant — exhaustive `match` on `Datum` will 
require a new arm. `InternalRow::get_row()` is additive (default impl).
   
   **Wire format**: Unchanged. ROW uses varint-length + CompactedRow blob, 
identical to `String`/`Bytes` — matches Java reference byte-for-byte.
   
   ### Documentation
   
   No new documentation needed.
   
   ### How to verify it
   
   - [x] `cargo test --workspace` — all 257 tests pass
   - [x] `cargo clippy --workspace -- -D warnings` — no new warnings
   - [ ] Manual: review the diff for correctness against the linked 
plan/research doc


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