Skip to content

ArrowArrayStreamReader errors on zero-column record batches #9394

@kylebarron

Description

@kylebarron

#8944 introduced a regression in 57.2 that broke support for loading RecordBatches with zero columns through FFI.

This was a breaking change for record batches with zero columns. In kylebarron/arro3#475 I bumped package versions only, with no code changes on my side, and I now have two failing tests. This test newly errors with

Exception: Invalid argument error: must either specify a row count or at least one column

This is because the old code used RecordBatch::from(StructArray), which preserved the row count from the StructArray.

The new code uses RecordBatch::try_new, which discards the row count info when there are 0 columns.

Originally posted by @kylebarron in #8944 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions