Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flight_data_to_arrow_batch does not support RecordBatches with no columns #1783

Closed
SuperTails opened this issue Jun 3, 2022 · 1 comment · Fixed by #1796
Closed

flight_data_to_arrow_batch does not support RecordBatches with no columns #1783

SuperTails opened this issue Jun 3, 2022 · 1 comment · Fixed by #1796
Labels
arrow-flight Changes to the arrow-flight crate bug good first issue Good for newcomers help wanted

Comments

@SuperTails
Copy link

Describe the bug

Attempting to use flight_data_to_arrow_batch on flight data that does not have any columns returns an InvalidArgumentError("must either specify a row count or at least one column").

To reproduce

Call flight_data_to_arrow_batch on a FlightData and Schema that does not have any columns.

Expected behavior

Calling flight_data_to_arrow_batch should use the row information in the RecordBatch header and return a valid record batch instead of returning an error.

Additional context

Support for RecordBatches with no columns but with a row count was already added in #1552. flight_data_to_arrow_batch already has the row count information provided as an argument. It gets read there in message.header_as_record_batch(), but then the subsequent reader::read_record_batch call seems to discard that info.

@tustvold
Copy link
Contributor

tustvold commented Jun 5, 2022

Thanks for the report, I'll bash this one out before the next release unless someone else picks it up 😀

@alamb alamb added the arrow-flight Changes to the arrow-flight crate label Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow-flight Changes to the arrow-flight crate bug good first issue Good for newcomers help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants