Skip to content

fix(arrow/scalar): handle zero-length scalar arrays - #1116

Open
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/scalar-zero-length-arrays
Open

fix(arrow/scalar): handle zero-length scalar arrays#1116
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/scalar-zero-length-arrays

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

MakeArrayFromScalar accepts a length of zero, but nested scalar types try to concatenate an empty input. Run-end encoded scalars also need an empty physical representation.

What changes are included in this PR?

Use empty builders for zero-length output and construct run-end encoded arrays with zero runs. Add coverage for nested and run-end encoded scalars.

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): support zero-length scalar arrays fix(arrow/scalar): build empty arrays from zero-length scalars Aug 5, 2026
@fallintoplace fallintoplace changed the title fix(arrow/scalar): build empty arrays from zero-length scalars fix(arrow/scalar): handle zero-length scalar arrays Aug 6, 2026
@fallintoplace
fallintoplace force-pushed the fix/scalar-zero-length-arrays branch from ed93c2c to 44d577b Compare August 6, 2026 17:36
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