WZhuo opened a new pull request, #780: URL: https://github.com/apache/iceberg-cpp/pull/780
## Summary Adds `ArrowRowBuilder` (`inspect/row_builder_internal`), a schema-driven helper that materializes in-memory rows into an Arrow `ArrowArray` (a batch) for an arbitrary Iceberg schema. It wraps the nanoarrow boilerplate and exposes per-column access plus typed append helpers, so metadata tables (snapshots, history, manifests, …) can emit rows without re-implementing it. This is the first of a series splitting metadata-table support into focused PRs; the `InMemoryBatchReader` and the `SnapshotsTable::Scan` integration are intended to follow in separate PRs that build on this. ## What's included - `ArrowRowBuilder::Make/column/FinishRow/Finish` and typed helpers `AppendNull/AppendBoolean/AppendInt/AppendString/AppendStringMap`. - The implementation lives in the **core** `iceberg` library — it only needs nanoarrow + `ToArrowSchema` (no Apache Arrow), matching peers like `manifest_adapter` and `arrow_c_data_util`. - Unit tests in `row_builder_test.cc` covering typed appends (int32/string/int64/boolean/map), null handling for optional columns, multi-entry/empty string maps, zero-row batches, and column-index bounds. Compiled into the `metadata_table_test` target. ## Testing - CMake (Ninja): `cmake --build build --target metadata_table_test` then ran it — 9/9 tests pass (4 existing `MetadataTableTest` + 5 new `ArrowRowBuilderTest`). `ctest` green. - The test verifies output by importing the produced C-data into Apache Arrow (`arrow::ImportRecordBatch`), so its target is `USE_BUNDLE`. ## Notes - The test is registered under CMake's bundle build only. The meson build (which has no Apache Arrow/bundle layer) is left unchanged; the core-only `metadata_table_test.cc` continues to build there. - Developed with AI-assisted tooling, reviewed by the author. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
