Skip to content

ipc: clear variadicCounts in recordEncoder.reset()#631

Merged
zeroshade merged 1 commit intoapache:mainfrom
polarsignals:asubiotto/vcount
Jan 14, 2026
Merged

ipc: clear variadicCounts in recordEncoder.reset()#631
zeroshade merged 1 commit intoapache:mainfrom
polarsignals:asubiotto/vcount

Conversation

@asubiotto
Copy link
Copy Markdown
Contributor

The reset() function did not clear variadicCounts, causing it to accumulate across batch encodings. This produces malformed IPC where each DictionaryBatch contains variadic counts from all previous batches, which other IPC reader implementations do not expect (e.g. arrow-rs)

Rationale for this change

arrow-rs was returning errors when reading IPC files written by arrow-go

What changes are included in this PR?

Clearing state on reset

Are these changes tested?

Yes

Are there any user-facing changes?

No

The reset() function did not clear variadicCounts, causing it to accumulate
across batch encodings. This produces malformed IPC where each DictionaryBatch
contains variadic counts from all previous batches, which other IPC reader
implementations do not expect (e.g. arrow-rs)

Signed-off-by: Alfonso Subiotto Marques <alfonso.subiotto@polarsignals.com>
@asubiotto
Copy link
Copy Markdown
Contributor Author

cc @zeroshade, would it be possible to backport and release 18.5.1?

Copy link
Copy Markdown
Member

@zeroshade zeroshade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can start working on backporting this and releasing an 18.5.1 this week.

Thanks!

@zeroshade zeroshade merged commit 64d0270 into apache:main Jan 14, 2026
40 of 41 checks passed
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.

2 participants