Skip to content

fix(array): reject unsupported type IDs#925

Open
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/array-type-dispatch-bounds
Open

fix(array): reject unsupported type IDs#925
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/array-type-dispatch-bounds

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

MakeFromData masked datatype IDs to six bits before dispatching to array constructors. Unsupported IDs could therefore alias valid constructors, silently producing the wrong concrete array type.

This validates the ID bounds and constructor entry before dispatching, while preserving the documented invalid-data-type panic. Regression coverage now includes IDs -1, 63, 64, 65, 127, and a large positive ID.

Tests:

  • go test ./arrow/array -run TestMakeFromData
  • go test ./arrow/array
  • go test ./arrow/... -run '^$'

@fallintoplace fallintoplace requested a review from zeroshade as a code owner July 11, 2026 07:44
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