kylebarron commented on PR #8944: URL: https://github.com/apache/arrow-rs/pull/8944#issuecomment-3892047665
To clarify: - It's **not** a 0-row record batch. - It's a 0-**column** record batch, with 4 rows. This can happen if you perform a `select([])` on a record batch leading to no columns, but maintaining the row length. - `RecordBatch::try_new` _does_ error on 0-column record batches. There's a separate [`RecordBatch::try_new_with_options`](https://docs.rs/arrow/latest/arrow/array/struct.RecordBatch.html#method.try_new_with_options) constructor for passing in a row length manually. - The two options for fixing are either: - Revert to `StructArray::from`, which handled the 0-column case, and then after assign the metadata - Add a case for using `RecordBatch::try_new_with_options` when the input isn't valid for `RecordBatch::try_new` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
