Skip to content

[rust] Add end-to-end ROW type#544

Open
fresh-borzoni wants to merge 2 commits intoapache:mainfrom
fresh-borzoni:row-type-revive
Open

[rust] Add end-to-end ROW type#544
fresh-borzoni wants to merge 2 commits intoapache:mainfrom
fresh-borzoni:row-type-revive

Conversation

@fresh-borzoni
Copy link
Copy Markdown
Member

@fresh-borzoni fresh-borzoni commented May 10, 2026

Continues work from #442 (which went stale).
Original implementation by @hemanthsavasere and this PR rebases on current main, addresses review feedback and adds the follow-ups listed below.

Closes #388
Closes #442

Original work

  • Datum::Row, InternalRow::get_row, CompactedRow ROW deserializer
  • NestedRowWriter, ROW arm in compacted key encoder
  • ROW round-trip unit tests

Added in this revival

  • field_id machinery (server requires unique ids across nested ROW —
    matches Java's ReassignFieldId)
  • ARRAY<ROW> support
  • Arrow log-path nested-ROW disambiguation
  • Per-row Vec<OnceLock> allocation killed
  • new tests

left followup #543 to address performance with nested structures, as this is PR is big enough and the gap comes from pre-existing code

- Add `Datum::Row(Box<GenericRow>)` variant with `as_row()` accessor
- Add `get_row()` to `InternalRow` trait with default error impl
- Implement `GenericRow::get_row()` and `CompactedRow::get_row()` delegation
- Implement `ColumnarRow::get_row()` with Arrow StructArray extraction + OnceLock caching
- Add `InnerValueWriter::Row(RowType)` and write path via nested CompactedRowWriter
- Add `DataType::Row` arm in `CompactedRowDeserializer` for eager nested decode
- Add `InnerFieldGetter::Row` and hook up FieldGetter/ValueWriter pipeline
- Handle `Datum::Row` in `resolve_row_types` (C++ bindings)
- Add round-trip tests: simple nesting, deep nesting, nullable fields, ROW as primary key

Wire format matches Java: varint-length-prefixed blob of a complete CompactedRow.
@fresh-borzoni
Copy link
Copy Markdown
Member Author

@fresh-borzoni fresh-borzoni force-pushed the row-type-revive branch 3 times, most recently from 54c8908 to 4ad3a28 Compare May 10, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Row data type support in Rust

2 participants