Skip to content

fix(arrow/scalar): preserve metadata in FromScalar - #1100

Merged
zeroshade merged 1 commit into
apache:mainfrom
fallintoplace:fix/scalar-metadata-roundtrip
Aug 7, 2026
Merged

fix(arrow/scalar): preserve metadata in FromScalar#1100
zeroshade merged 1 commit into
apache:mainfrom
fallintoplace:fix/scalar-metadata-roundtrip

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

FromScalar creates metadata slices with a non-zero length and then appends to them. Each decoded metadata entry therefore gets an extra empty key and value.

What changes are included in this PR?

Build the slices with zero length and the required capacity, then add a metadata round-trip regression test.

Are these changes tested?

  • go test ./arrow/scalar

Are there any user-facing changes?

No API changes. This corrects the reported behavior while preserving the existing ownership and compatibility contracts.

@fallintoplace fallintoplace changed the title fix(arrow/scalar): preserve metadata lengths in FromScalar fix(arrow/scalar): fix metadata reconstruction in FromScalar Aug 5, 2026
@fallintoplace fallintoplace changed the title fix(arrow/scalar): fix metadata reconstruction in FromScalar fix(arrow/scalar): preserve metadata in FromScalar Aug 6, 2026
@zeroshade
zeroshade merged commit 998203c into apache:main Aug 7, 2026
23 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