Repository navigation
Conversation
The IPC encoder already wrote the RunEndEncoded type, but the decoder rejected it with ENOTSUP. The RunEndEncoded type table has no parameters and the array has no buffers of its own, only the run_ends and values children, so map it to the "+r" format and let the existing child and buffer handling do the rest. Closes apache#833.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #996 +/- ##
==========================================
+ Coverage 78.58% 78.59% +0.01%
==========================================
Files 106 106
Lines 17173 17177 +4
Branches 2045 2046 +1
==========================================
+ Hits 13495 13501 +6
+ Misses 2427 2423 -4
- Partials 1251 1253 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #833.
The IPC encoder already writes the
RunEndEncodedtype, but the decoder stopped at the schema with "RunEndEncoded not yet supported in IPC reader". TheRunEndEncodedtype table has no parameters and a run-end encoded array has no buffers of its own (only therun_endsandvalueschildren), so the reader only needs to map the type to the+rformat. The existing child field and buffer handling already treats it like the other buffer-less layouts, and validation of the run ends is the existingArrowArrayViewlogic. The new code also checks that the field has exactly two children so a malformed schema gets a clear error.Testing
run_end_encoded(int16, utf8),run_end_encoded(int32, int64)andrun_end_encoded(int64, float64)to the type list used by the decoder roundtrip tests (Arrow C++ schema/array -> IPC -> nanoarrow, and nanoarrow -> IPC -> nanoarrow).cpp-21.0.0/generated_run_end_encoded.streamfromNotSupportedtoOKinfiles_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.)NANOARROW_IPC=ON NANOARROW_BUILD_TESTS=ON NANOARROW_BUILD_TESTS_WITH_ARROW=ONagainst Arrow C++ 26.0.0 and current apache/arrow-testing:ctest896/896 passed.This PR was prepared with AI assistance; I reviewed the changes and ran the checks above.