Skip to content

fix(arrow/array): preserve rows for empty-schema JSON input - #1117

Merged
zeroshade merged 1 commit into
apache:mainfrom
fallintoplace:fix/array-json-empty-schema
Aug 7, 2026
Merged

fix(arrow/array): preserve rows for empty-schema JSON input#1117
zeroshade merged 1 commit into
apache:mainfrom
fallintoplace:fix/array-json-empty-schema

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

JSONReader currently derives the row count from field builder lengths. With an empty schema there are no field builders, so valid JSON objects are reported as zero-row batches.

What changes are included in this PR?

Track decoded rows independently so single-record and whole-input reads preserve rows even when the schema has no fields.

Are these changes tested?

  • go test ./arrow/array

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/array): preserve JSON rows with empty schemas fix(arrow/array): count rows for empty-schema JSON input Aug 5, 2026
@fallintoplace fallintoplace changed the title fix(arrow/array): count rows for empty-schema JSON input fix(arrow/array): preserve rows for empty-schema JSON input Aug 6, 2026
@fallintoplace
fallintoplace force-pushed the fix/array-json-empty-schema branch from e95d983 to 02d09df Compare August 6, 2026 17:36
@zeroshade
zeroshade merged commit 51b21f8 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