Skip to content

Test and fix for bug in selectMapimpl#726

Merged
zeroshade merged 4 commits intoapache:mainfrom
wwarner-inf:bug-report/selectMapImpl
Mar 25, 2026
Merged

Test and fix for bug in selectMapimpl#726
zeroshade merged 4 commits intoapache:mainfrom
wwarner-inf:bug-report/selectMapImpl

Conversation

@wwarner-inf
Copy link
Copy Markdown
Contributor

Rationale for this change

Maps of Nullables produce corrupted parquet.

What changes are included in this PR?

The existing tests for TakeKernelMap are made runnable by correcting the test json to be suitable input for array.FromJSON(). Added a condition in assertTakeArrays() that checks that the data type has been preserved. Using the C++ implementation as a reference.

Are these changes tested?

Yes, but not deeply.

Are there any user-facing changes?

The api is unchanged, however parquet output will change slightly for those files containing maps with optional values.

@wwarner-inf wwarner-inf requested a review from zeroshade as a code owner March 24, 2026 21:03
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.

Can you include an explicit test of the case that was producing the corrupted parquet files for you? It looks like the issue is the case where the Value was nullable?

@wwarner-inf
Copy link
Copy Markdown
Contributor Author

@zeroshade narrowed it down to just a failing test. 685678d

@zeroshade
Copy link
Copy Markdown
Member

@wwarner-inf it looks like you dropped the fix from the commits by accident

@wwarner-inf
Copy link
Copy Markdown
Contributor Author

Not an accident -- I thought maybe you wanted a clean demonstration of the problem. It's here and sure I can put it back if that suits you!

@zeroshade zeroshade merged commit bede4c2 into apache:main Mar 25, 2026
5 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