Skip to content

Fix ArrowArrayStreamReader for 0-columns record batch streams#9405

Merged
alamb merged 3 commits intoapache:mainfrom
jonded94:fix-ffi-record-batch-for-empty-columns
Feb 13, 2026
Merged

Fix ArrowArrayStreamReader for 0-columns record batch streams#9405
alamb merged 3 commits intoapache:mainfrom
jonded94:fix-ffi-record-batch-for-empty-columns

Conversation

@jonded94
Copy link
Contributor

Which issue does this PR close?

Rationale for this change

PR #8944 introduced a regression that 0-column record batch streams could not longer be decoded.

What changes are included in this PR?

  • Construct RecordBatch with try_new_with_options using the len of the ArrayData, instead of letting it try to implicitly determine len by looking at the first column (this is what try_new does).
  • Slight refactor and reduction of code duplication of the existing test_stream_round_trip_[import/export] tests
  • Introduction of a new test_stream_round_trip_no_columns test

Are these changes tested?

Yes, both export and import are tested in test_stream_round_trip_no_columns.

Are there any user-facing changes?

0-column record batch streams should be decodable now.

@github-actions github-actions bot added the arrow Changes to the arrow crate label Feb 12, 2026
@jonded94
Copy link
Contributor Author

@alamb what could

fatal error: file "/home/runner/work/arrow-rs/arrow-rs/target/miri/debug/build/quote-32cc00414fa6f72d/build-script-build" contains outdated or invalid JSON; try `cargo clean`

of the MIRI test be about?

@alamb
Copy link
Contributor

alamb commented Feb 12, 2026

@alamb what could

fatal error: file "/home/runner/work/arrow-rs/arrow-rs/target/miri/debug/build/quote-32cc00414fa6f72d/build-script-build" contains outdated or invalid JSON; try `cargo clean`

of the MIRI test be about?

I am pretty sure not related to this PR

@alamb
Copy link
Contributor

alamb commented Feb 12, 2026

since MIRI runs with nightly rust, I suspect something broke in nightly and I plan to wait a day or two before investingating in more depth

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me -- thank you @jonded94

cc @kylebarron

Copy link
Member

@kylebarron kylebarron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes sense, thank you!

@alamb alamb merged commit d8946ca into apache:main Feb 13, 2026
26 checks passed
@alamb
Copy link
Contributor

alamb commented Feb 13, 2026

Thanks again @jonded94 and @kylebarron

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow Changes to the arrow crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ArrowArrayStreamReader errors on zero-column record batches

3 participants