Skip to content

fix(arrow/array): make dictionary suffix null indexes relative - #1064

Open
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/dictionary-suffix-null-index
Open

fix(arrow/array): make dictionary suffix null indexes relative#1064
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/dictionary-suffix-null-index

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

What changed

Clear the validity bit using the null index relative to startOffset when exporting a dictionary suffix.

Why

GetDictArrayData builds a new dictionary whose bitmap starts at the requested offset, but it previously cleared the absolute memo-table index. For nonzero offsets this could mark the wrong dictionary entry valid while still reporting one null.

The regression test exports a suffix containing a null and verifies that the corresponding relative entry is null.

Testing

  • go test ./arrow/array

@fallintoplace
fallintoplace requested a review from zeroshade as a code owner July 29, 2026 21:35

@serramatutu serramatutu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ran the test before/after the fix, it does repro the issue. LGTM.

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