ump45nose opened a new pull request, #996: URL: https://github.com/apache/arrow-nanoarrow/pull/996
Closes #833. The IPC encoder already writes the `RunEndEncoded` type, but the decoder stopped at the schema with "RunEndEncoded not yet supported in IPC reader". The `RunEndEncoded` type table has no parameters and a run-end encoded array has no buffers of its own (only the `run_ends` and `values` children), so the reader only needs to map the type to the `+r` format. The existing child field and buffer handling already treats it like the other buffer-less layouts, and validation of the run ends is the existing `ArrowArrayView` logic. The new code also checks that the field has exactly two children so a malformed schema gets a clear error. ### Testing - Added `run_end_encoded(int16, utf8)`, `run_end_encoded(int32, int64)` and `run_end_encoded(int64, float64)` to the type list used by the decoder roundtrip tests (Arrow C++ schema/array -> IPC -> nanoarrow, and nanoarrow -> IPC -> nanoarrow). - Switched `cpp-21.0.0/generated_run_end_encoded.stream` from `NotSupported` to `OK` in `files_test.cc`, so the arrow-testing file is read and compared with Arrow C++'s read, and nanoarrow's written stream is read back by Arrow C++. (The JSON check for that file is still skipped because the testing JSON reader does not know run-end encoded yet.) - Without the decoder change, 6 of the new roundtrip tests and the file test fail; with it they pass. - Debug build with `NANOARROW_IPC=ON NANOARROW_BUILD_TESTS=ON NANOARROW_BUILD_TESTS_WITH_ARROW=ON` against Arrow C++ 26.0.0 and current apache/arrow-testing: `ctest` 896/896 passed. - clang-format 16.0.6 (the pre-commit version) applied. This PR was prepared with AI assistance; I reviewed the changes and ran the checks above. -- 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]
