Skip to content

fix(ipc): handle missing flatbuffer tables and dictionary flags - #960

Merged
paleolimbot merged 3 commits into
apache:mainfrom
paleolimbot:codex/fix-ipc-decoder-missing-tables
Oct 13, 2026
Merged

paleolimbot merged 3 commits into
apache:mainfrom
paleolimbot:codex/fix-ipc-decoder-missing-tables

Conversation

@paleolimbot

@paleolimbot paleolimbot commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Reject IPC messages with missing Field.type, Message.header, or DictionaryBatch.data tables. Validate nested dictionary record-batch node and buffer counts before accessing their vectors, returning EINVAL for missing or mismatched vectors. Preserve outer-field nullability while keeping dictionary values nullable.

Add regressions for malformed tables, missing/empty/incorrect vector counts through both dictionary decoding APIs, recovery after rejected batches, default int32 dictionary indices, and non-nullable dictionary round trips.

Closes #958
Closes #959

Tests: 102 IPC-related CTests passed with ZSTD and LZ4 enabled; pre-commit checks passed. The new vector-count regression reproduces the assertion failure before the fix.

@codecov-commenter

codecov-commenter commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.96970% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 78.24%. Comparing base (bb5d8d7) to head (37ccebf).

Files with missing lines Patch % Lines
src/nanoarrow/ipc/decoder.c 96.96% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #960      +/-   ##
==========================================
+ Coverage   78.20%   78.24%   +0.04%     
==========================================
  Files         106      106              
  Lines       16851    16867      +16     
  Branches     1988     1993       +5     
==========================================
+ Hits        13178    13198      +20     
+ Misses       2438     2437       -1     
+ Partials     1235     1232       -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@paleolimbot
paleolimbot marked this pull request as ready for review October 11, 2026 02:04
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.

Non-nullable dictionary-encoded fields decode as nullable IPC decoder crashes on messages missing optional flatbuffer tables that pass verification

2 participants