Skip to content

fix(compute/kernels): map FSB byte-width to numeric memo type for is_in#797

Merged
zeroshade merged 1 commit intoapache:mainfrom
SAY-5:fix/isIn-fixedsizebinary-bounds-785
May 4, 2026
Merged

fix(compute/kernels): map FSB byte-width to numeric memo type for is_in#797
zeroshade merged 1 commit intoapache:mainfrom
SAY-5:fix/isIn-fixedsizebinary-bounds-785

Conversation

@SAY-5
Copy link
Copy Markdown
Contributor

@SAY-5 SAY-5 commented May 3, 2026

Closes #785.

CreateSetLookupState already routes FixedSizeBinary widths 1/2/4/8 onto the numeric fast path (SetLookupState[uintN] + visitNumeric[uintN]), but Init then asked newMemoTable for arrow.FIXED_SIZE_BINARY and got a BinaryMemoTable, which fails the subsequent TypedMemoTable[uintN] assertion. The cleanup hook had the same blind spot — it cast every state to SetLookupState[[]byte] and would have panicked there too once Init was fixed.

Map the FSB byte-width to the matching uint type before the lookup, and only release in CleanupFn when the state actually carries a BinaryMemoTable. Adds a regression test exercising widths 1/2/4/8.

CreateSetLookupState routes FixedSizeBinary widths 1/2/4/8 onto the
numeric fast path (SetLookupState[uintN] + visitNumeric[uintN]), but
Init asked newMemoTable for arrow.FIXED_SIZE_BINARY and got a
BinaryMemoTable, which fails the TypedMemoTable[uintN] assertion. Map
the byte-width to the matching uint type before the lookup, and only
release in CleanupFn when the state actually carries a BinaryMemoTable
so the numeric paths don't fall over a wrong type assertion either.
Adds a regression test exercising widths 1/2/4/8.

Signed-off-by: SAY-5 <say.apm35@gmail.com>
@SAY-5 SAY-5 requested a review from zeroshade as a code owner May 3, 2026 20:15
@zeroshade
Copy link
Copy Markdown
Member

Thanks for this! Good catch

@zeroshade zeroshade merged commit 228ea5d into apache:main May 4, 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.

[Go][Compute] Panic in isIn kernel for FixedSizeBinary: slice bounds out of range in bufferbuilder.go

2 participants