Skip to content

fix(arrow/ipc): reject non-dictionary initial messages - #1054

Open
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/ipc-initial-dictionary-type
Open

fix(arrow/ipc): reject non-dictionary initial messages#1054
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/ipc-initial-dictionary-type

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

When an IPC schema declares dictionaries, the reader expects dictionary batches before records. It detected an unexpected message but continued into readDictionary, which could replace the useful protocol error and consume the wrong message.

What changes are included in this PR?

Stop immediately, mark the reader done, and preserve the expected-dictionary error.

Are these changes tested?

Yes. A regression test provides a dictionary schema followed directly by a record batch.

go test ./arrow/ipc -run TestReaderRejectsRecordBatchBeforeInitialDictionary

Are there any user-facing changes?

Malformed streams now fail deterministically with the specific dictionary-ordering error.

@fallintoplace
fallintoplace requested a review from zeroshade as a code owner July 29, 2026 16:53
@fallintoplace fallintoplace changed the title fix(arrow/ipc): stop initial dictionary loading after unexpected message type fix(arrow/ipc): reject non-dictionary initial messages Jul 29, 2026
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.

1 participant