Repository navigation
fix(ipc): Decode a DictionaryEncoding without indexType as int32 indices - #957
Merged
ianmcook merged 1 commit intoOct 9, 2026
Merged
Conversation
Schema.fbs says that a null DictionaryEncoding.indexType means signed int32 indices, but the decoder passed the missing table to ArrowIpcDecoderSetTypeInt() and crashed. Use int32 when the field is absent. Closes apache#956
paleolimbot
approved these changes
Oct 6, 2026
paleolimbot
left a comment
Member
There was a problem hiding this comment.
On green CI this is good to merge...thank you!
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #957 +/- ##
==========================================
- Coverage 78.20% 78.20% -0.01%
==========================================
Files 106 106
Lines 16849 16851 +2
Branches 1986 1988 +2
==========================================
+ Hits 13177 13178 +1
Misses 2438 2438
- Partials 1234 1235 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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 #956
Schema.fbssays that whenDictionaryEncoding.indexTypeis null, the indices must be signed int32. The decoder passed the missing table straight toArrowIpcDecoderSetTypeInt(), which crashed (a segfault in release builds, flatcc's "null pointer table access" assertion in debug builds). It now uses int32 when the field isn't present.The new
NanoarrowIpcDecodeDictionarySchemaWithoutIndexTypetest decodes a schema message with onedictionary<values=string, indices=int32>field that pyarrow 25.0.1 wrote, withindexTypethen removed from it. It crashes without the fix. I also read theWITHOUT_INDEX_TYPEstream from the issue withArrowIpcArrayStreamReader: it now givesstruct<text: dictionary(int32)<string>>with the valuesa b a, the same as the stream that hasindexType.ctestpasses (384 tests, compression tests skipped), and pre-commit passes on the changed files.